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

Problem with torch.FloatTensor and torch.cuda.FloatTensor #15

Open
duc-anh-2002 opened this issue May 24, 2024 · 0 comments
Open

Problem with torch.FloatTensor and torch.cuda.FloatTensor #15

duc-anh-2002 opened this issue May 24, 2024 · 0 comments

Comments

@duc-anh-2002
Copy link

Thank you for your repository, at this time, I have the problem as follows:
" File "main_debug.py", line 495, in main
train_stats = train_one_epoch(
File "/home/ubuntu/workspace/mamba/simba/classification/engine.py", line 48, in train_one_epoch
outputs = model(samples)
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/workspace/mamba/simba/classification/simba_debug.py", line 603, in forward
x, H, W = self.forward_embeddings(x)
File "/home/ubuntu/workspace/mamba/simba/classification/simba_debug.py", line 659, in forward_embeddings
x, H, W = patch_embed(x)
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/workspace/mamba/simba/classification/simba_debug.py", line 477, in forward
x = self.conv(torch.FloatTensor(x))
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/container.py", line 139, in forward
input = module(input)
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 457, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/ubuntu/workspace/envs/simba/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 453, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
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"
Could you help me to fix this bug, thank you

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

1 participant