Bohao-Lee / CME

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError: shape '[64, 15, 845]' is invalid for input of size 1622400

xiangcaigongzhu opened this issue · comments

你好,我代码流程按照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

你好,我也遇到了同

你好,我代码流程按照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

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