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: shape '[64, 15, 845]' is invalid for input of size 1622400 #35

Open
xiangcaigongzhu opened this issue Apr 15, 2023 · 1 comment

Comments

@xiangcaigongzhu
Copy link

你好,我代码流程按照readme一步步来,但是最后报错,维度不匹配,请问是什么原因造成的,有什么解决办法吗?
2023-04-15 02:09:51 epoch 0/353, processed 0 samples, lr 0.000033
THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=383 error=11 : invalid argument
/opt/conda/lib/python3.6/site-packages/torch/nn/_reduction.py:46: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
warnings.warn(warning.format(ret))
Traceback (most recent call last):
File "tool/train_decoupling_disturbance.py", line 405, in
train(epoch,repeat_time,mask_ratio)
File "tool/train_decoupling_disturbance.py", line 286, in train
loss = region_loss(output, target, dynamic_weights, target_cls_ids)
File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(input, **kwargs)
File "/code/2023/CME/core/region_loss.py", line 417, in forward
cls = cls.view(bs, cs, nA
nCnHnW).transpose(1,2).contiguous().view(bsnAnCnHnW, cs)
RuntimeError: shape '[64, 15, 845]' is invalid for input of size 1622400

@xiangcaigongzhu xiangcaigongzhu changed the title 你好 RuntimeError: shape '[64, 15, 845]' is invalid for input of size 1622400 Apr 15, 2023
@qiqiqi733
Copy link

你好,我也遇到了同

你好,我代码流程按照readme一步步来,但是最后报错,维度不匹配,请问是什么原因造成的,有什么解决办法吗? 2023-04-15 02:09:51 epoch 0/353, processed 0 samples, lr 0.000033 THCudaCheck FAIL file=/pytorch/aten/src/THC/THCGeneral.cpp line=383 error=11 : invalid argument /opt/conda/lib/python3.6/site-packages/torch/nn/_reduction.py:46: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead. warnings.warn(warning.format(ret)) Traceback (most recent call last): File "tool/train_decoupling_disturbance.py", line 405, in train(epoch,repeat_time,mask_ratio) File "tool/train_decoupling_disturbance.py", line 286, in train loss = region_loss(output, target, dynamic_weights, target_cls_ids) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(_input, **kwargs) File "/code/2023/CME/core/region_loss.py", line 417, in forward cls = cls.view(bs, cs, nA_nC_nH_nW).transpose(1,2).contiguous().view(bs_nA_nC_nH_nW, cs) RuntimeError: shape '[64, 15, 845]' is invalid for input of size 1622400

你好,我也如此,请问您解决了吗

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