VITA-Group / LightGaussian

"LightGaussian: Unbounded 3D Gaussian Compression with 15x Reduction and 200+ FPS", Zhiwen Fan, Kevin Wang, Kairun Wen, Zehao Zhu, Dejia Xu, Zhangyang Wang
https://lightgaussian.github.io/
Other
506 stars 41 forks source link

Getting 'tensor object is not callable' #9

Closed bmikaili closed 6 months ago

bmikaili commented 6 months ago

I'm running train_densify_prune on a scene of my own. After about 15k iterations i get:

Traceback (most recent call last):
  File "/root/ma-ws23_24-berzan-yildiz-remote-computer-vision/LightGaussian/train_densify_prune.py", line 266, in <module>
    training(
  File "/root/ma-ws23_24-berzan-yildiz-remote-computer-vision/LightGaussian/train_densify_prune.py", line 202, in training
    v_list = calculate_v_imp_score(gaussians, imp_list, args.v_pow)
  File "/root/ma-ws23_24-berzan-yildiz-remote-computer-vision/LightGaussian/prune.py", line 120, in calculate_v_imp_score
    volume = torch.prod(gaussians.get_scaling(), dim=1)
TypeError: 'Tensor' object is not callable

I run it with python train_densify_prune.py -s dataset on a dataset converted with convert.py.

Any ideas what could be going wrong?

Kevin-2017 commented 6 months ago

I think it's a bug that I accidentally wrote when cleaning up the code. I would fix it later today :D

bmikaili commented 6 months ago

Ah okay, happens :D At least you know what it is!

Kevin-2017 commented 6 months ago

Should be fixed, thanks for notifying it!

bmikaili commented 6 months ago

Actually have to reopen this 😅 Now I am getting this error. I run it on a GTX 4090 on runpod.io.

Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.4.0-152-generic x86_64)

          if (final_output) {
            set_results_to_output<output_vec_size>(value, base_offsets);
          } else {
            #pragma unroll
            for (int i = 0; i < output_vec_size; i++) {
              *(out[i]) = get_accumulated_output(out[i], value[i]);
            }
          }
        } else {
          if (accumulate) {
            #pragma unroll
            for (int i = 0; i < output_vec_size; i++) {
              value[i] = reducer::combine((*acc)[i], value[i]);
            }
          }
          if (final_output) {
            set_results_to_output<output_vec_size>(value, base_offsets);
          } else {
            *acc = value;
          }
        }
      }
    }

    return value;
  }
};

extern "C"
__launch_bounds__(512, 4)
__global__ void reduction_prod_kernel(ReduceJitOp r){
  r.run();
}
nvrtc: error: invalid value for --gpu-architecture (-arch)
Kevin-2017 commented 6 months ago

I've just updated the code. If you're still encountering the same error, could you walk me through the steps you took that led to it? This will help me understand the issue better. Thanks!

bmikaili commented 6 months ago

All good now! Thanks so much for fixing it