维度不匹配
Lan2Kailee opened this issue · 2 comments
首先谢谢您的代码,我在运行过程中出现了这样的问题,请问是什么原因呢?
PS D:\centernet\centernet> & D:/Anaconda3/envs/pytorch/python.exe d:/centernet/centernet/train.py
Load weights model_data/res2net50_v1b_26w_4s-3cf99910.pth.
Start Train
Epoch 1/50: 0%| | 0/1034 [00:13<?, ?it/s<class 'dict'>]
Traceback (most recent call last):
File "d:/centernet/centernet/train.py", line 215, in
epoch_step, epoch_step_val, gen, gen_val, end_epoch, Cuda, backbone)
File "d:\centernet\centernet\utils\utils_fit.py", line 33, in fit_one_epoch
hm, wh, offset = model_train(batch_images)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "d:\centernet\centernet\nets\centernet.py", line 31, in forward
feat = self.backbone(x)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\container.py", line 92, in forward
input = module(input)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "d:\centernet\centernet\nets\resnet50.py", line 81, in forward
sp = sp + spx[i]
RuntimeError: The size of tensor a (64) must match the size of tensor b (128) at non-singleton dimension 3
你好,我也遇到了这个问题,你这个问题解决了吗