You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run this code in python3.6
I met an error
'File "/home/user/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 33, in init
out_channels, in_channels // groups, *kernel_size))
TypeError: torch.FloatTensor constructor received an invalid combination of arguments - got (float, int, int, int), but expected one of:
no arguments
(int ...)
didn't match because some of the arguments have invalid types: (float, int, int, int)
(torch.FloatTensor viewed_tensor)
(torch.Size size)
(torch.FloatStorage data)
(Sequence data)
'
Do you know how to fix it
Thank you
The text was updated successfully, but these errors were encountered:
@zhaobingbingbing , sorry for reply so late.
ok, it means that float is not supported, you can cast it to int before. In python2 int/int=int, but in python3 int/int=float , so that is the reason.
you can add int() for casting in ResidualBlock.
When I run this code in python3.6
I met an error
'File "/home/user/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 33, in init
out_channels, in_channels // groups, *kernel_size))
TypeError: torch.FloatTensor constructor received an invalid combination of arguments - got (float, int, int, int), but expected one of:
didn't match because some of the arguments have invalid types: (float, int, int, int)
'
Do you know how to fix it
Thank you
The text was updated successfully, but these errors were encountered: