pmj110119 / RenderOcc

[ICRA 2024] RenderOcc: Vision-Centric 3D Occupancy Prediction with 2D Rendering Supervision. (Early version: UniOcc)
447 stars 25 forks source link

I'm confused why I have to edit my code to run correctly. #34

Open Ira569 opened 9 months ago

Ira569 commented 9 months ago

I have to add the following code in renderocc.py's function 'simple_test' and 'forward_train' to run the training process without error: RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

code:

def forward_train(self,
                      points=None,
                      img_metas=None,
                      img_inputs=None,
                      **kwargs):
    for i in range(len(img_inputs)):
        img_inputs[i] = img_inputs[i].to('cuda')
    ...

But i got the exact same code as the git repo.

there is another issue in swin-transformer which is also confused:

/home/lkshpc/miniconda3/envs/renderocc/lib/python3.8/site-packages/torch/utils/checkpoint.py:25: UserWarning: None of the inputs have requires_grad=True. Gradients will be None

windkiss5 commented 8 months ago

i have the same problem!!!