AttributeError: 'float' object has no attribute 'unsqueeze' #5638
Unanswered
ljx761795750
asked this question in
Q&A
Replies: 1 comment
-
Thanks for reporting. Would you mind providing a code example to reproduce this bug? I'm afraid I cannot figure it out based on your traceback logs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear author, hello.
Thank you for your contribution. I encountered some problems when you provided the code above github.
Traceback (most recent call last):
File "./../../..///test.py", line 137, in
mean_acc = test(model, test_loader,label_names,cuda=args.cuda)
File "/home/li/anaconda3/envs/3D/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(args, kwargs)
File "./../../..///test.py", line 31, in test
outputs = model(batch_1, batch_2)
File "/home/li/anaconda3/envs/3D/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "/mnt/xishu/test2/munegc-master///twostream_network.py", line 114, in forward
data = self.multimodal_gp_fusion(data_b1, data_b2)
File "/home/li/anaconda3/envs/3D/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(input, kwargs)
File "/mnt/xishu/test2/munegc-master//***/twostream_network.py", line 29, in forward
cluster = torch_geometric.nn.voxel_grid(pos, batch, self.pool_rad, start=start, end=end)
File "/home/li/anaconda3/envs/3D/lib/python3.8/site-packages/torch_geometric/nn/pool/voxel_grid.py", line 58, in voxel_grid
pos = torch.cat([pos, batch.unsqueeze(-1).type_as(pos)], dim=-1)
AttributeError: 'float' object has no attribute 'unsqueeze'
Beta Was this translation helpful? Give feedback.
All reactions