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

RuntimeError: The size of tensor a (370) must match the size of tensor b (170) at non-singleton dimension 1邻接矩阵数据和处理后的数据貌似不匹配 #6

Open
ZHUGUODONG1 opened this issue Jun 28, 2023 · 3 comments

Comments

@ZHUGUODONG1
Copy link

Traceback (most recent call last):
File "/home/zgd21/traffic/DGCN-master/GRCN.py", line 176, in
compute_val_loss(net, val_loader, loss_function, supports, device, epoch=0)
File "/home/zgd21/traffic/DGCN-master/lib/utils.py", line 222, in compute_val_loss
output,, = net(val_w, val_d, val_r, supports)
File "/opt/anaconda3/envs/zgd21tiankeng/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/zgd21/traffic/DGCN-master/model.py", line 369, in forward
x=self.block1(x,supports)
File "/opt/anaconda3/envs/zgd21tiankeng/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/zgd21/traffic/DGCN-master/utils.py", line 734, in forward
fea1=self.gcn_conv(tem1,supports)
File "/opt/anaconda3/envs/zgd21tiankeng/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/zgd21/traffic/DGCN-master/utils.py", line 700, in forward
L2 = 2 *torch.matmul( adj, L1) - L0
RuntimeError: The size of tensor a (370) must match the size of tensor b (170) at non-singleton dimension 1邻接矩阵数据和处理后的数据貌似不匹配

@ZHUGUODONG1
Copy link
Author

parser.add_argument('--num_point', type=int, default=370,
help='road Point Number [370/397] ', required=False) 是要把default=370换成170?

@ZHUGUODONG1
Copy link
Author

370换成170这有代表着什么?

@guokan987
Copy link
Owner

370换成170这有代表着什么?

路网的路段节点数量

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