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

Type erorr about torch.FloatTensor and torch.cuda.FloatTensor #3

Open
zhouhongh opened this issue Oct 14, 2019 · 0 comments
Open

Type erorr about torch.FloatTensor and torch.cuda.FloatTensor #3

zhouhongh opened this issue Oct 14, 2019 · 0 comments

Comments

@zhouhongh
Copy link

Hi:
I followed your instructions in readme,but I got the following error:
Traceback (most recent call last):
File "test_refine_w_mask_two_path.py", line 149, in
a.test()
File "test_refine_w_mask_two_path.py", line 124, in test
y_pred_before_refine, y_pred, mu, logvar, flow, flowback, mask_fw, mask_bw = vae(frame1, data, bg_mask, fg_mask, noise_bg, z_m)
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zhouhh/seg2vid/src/models/multiframe_w_mask_genmask_two_path.py", line 254, in forward
enco1, enco2, enco3, codex = self.encoder(input).cuda()
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zhouhh/seg2vid/src/models/multiframe_w_mask_genmask_two_path.py", line 157, in forward
enco1 = self.econv1(x) # 32
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zhouhh/seg2vid/src/models/multiframe_w_mask_genmask_two_path.py", line 91, in forward
return self.main(x)
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zhouhh/anaconda3/envs/python35/lib/python3.5/site-packages/torch/nn/modules/conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight'
Could you give me some advices?

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