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

Runtimerror #5

Open
MrDec opened this issue Jan 23, 2024 · 1 comment
Open

Runtimerror #5

MrDec opened this issue Jan 23, 2024 · 1 comment

Comments

@MrDec
Copy link

MrDec commented Jan 23, 2024

Traceback (most recent call last):
File "/home/dww/OD/others/SRGCAE-master/train_SRGCAE_Local.py", line 153, in
train_model(args)
File "/home/dww/OD/others/SRGCAE-master/train_SRGCAE_Local.py", line 76, in train_model
feat_t1 = GCAE_model(node_t1, norm_adj_t1)
File "/home/dww/anaconda3/envs/detection/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/dww/OD/others/SRGCAE-master/model/SRGCAE.py", line 35, in forward
x = torch.sigmoid(self.gc1(x, adj))
File "/home/dww/anaconda3/envs/detection/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/dww/OD/others/SRGCAE-master/model/GraphConv.py", line 33, in forward
output = torch.mm(adj, support)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (358x358 and 0x16)

运行报错

@ChenHongruixuan
Copy link
Owner

Hi @MrDec ,

This problem should be caused by the different version of slic algorithm. Please modify it to: objects = slic(img_t2, n_segments=args.n_seg, compactness=args.cmp, start_label=0).

In recent version, the label returned by slic starts from 1 instead of 0. The latter is the returned start result of the version in our code environment.

Best,

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