Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ira569 opened this issue Feb 26, 2024 · 1 comment
Open

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

Ira569 opened this issue Feb 26, 2024 · 1 comment

Comments

@Ira569
Copy link

Ira569 commented Feb 26, 2024

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
Copy link

i have the same problem!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants