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

运行代码就报错?都没修改 #23

Open
lmqhello opened this issue Mar 28, 2024 · 1 comment
Open

运行代码就报错?都没修改 #23

lmqhello opened this issue Mar 28, 2024 · 1 comment

Comments

@lmqhello
Copy link

Traceback (most recent call last):
File "src/main.py", line 19, in
main()
File "src/main.py", line 14, in main
model.fit()
File "/lmq/CapsGNN/src/capsgnn.py", line 293, in fit
prediction, reconstruction_loss = self.model(data)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/lmq/CapsGNN/src/capsgnn.py", line 147, in forward
first_capsule_output = self.first_capsule(hidden_representations)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/lmq/CapsGNN/src/layers.py", line 86, in forward
u = [self.unitsi for i in range(self.num_units)]
File "/lmq/CapsGNN/src/layers.py", line 86, in
u = [self.unitsi for i in range(self.num_units)]
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 313, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/usr/local/miniconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 309, in _conv_forward
return F.conv1d(input, weight, bias, self.stride,
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [1, 2, 20, 15]

@mitu316
Copy link

mitu316 commented Apr 25, 2024

layer 文件有个conv1d 改为conv2d 我倒是发现loss两轮之后就一直为nan 还要调一下,坑死

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