Closed ZangHuanyu closed 2 years ago
Please check the input shape of your dataloader.
Please check the input shape of your dataloader.
Thanks a lot, I just figure it out that's because I use "tencrop", which got new parameter 10.
I got one more error which is:
Epoch: [0][210/225] Time 0.197 (0.197) Data 0.035 (0.034) Loss 2.8036 (4.5181) Prec@1 14.844 (21.738) Prec@5 91.406 (83.527)
Epoch: [0][220/225] Time 0.196 (0.197) Data 0.035 (0.034) Loss 3.0783 (4.4549) Prec@1 12.500 (21.550) Prec@5 79.688 (83.488)
Traceback (most recent call last):
File "D:/Github_code/Res2Net_ImageNet/res2net_pami/main.py", line 378, in
Appreciated if any suggestions!
Have you solved your problem?
Hi
I stoped here when I using the code from https://github.com/Res2Net/Res2Net-ImageNet-Training I got error as:
` Epoch: [0][210/225] Time 0.167 (0.280) Data 0.037 (0.042) Loss 2.6880 (4.3539) Prec@1 17.969 (21.686) Prec@5 85.938 (83.897) Epoch: [0][220/225] Time 0.170 (0.275) Data 0.030 (0.042) Loss 2.6971 (4.2777) Prec@1 28.906 (21.826) Prec@5 88.281 (83.993) Traceback (most recent call last): File "D:/Github_code/Res2Net_ImageNet/res2net_pami/main.py", line 378, in
main()
File "D:/Github_code/Res2Net_ImageNet/res2net_pami/main.py", line 215, in main
prec1, prec5 = validate(PublicTestloader, model.cuda(), criterion, epoch)
File "D:/Github_code/Res2Net_ImageNet/res2net_pami/main.py", line 301, in validate
output = model(input)
File "C:\Users\zhy34\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(*input, *kwargs)
File "D:\Github_code\Res2Net_ImageNet\res2net_pami\res2net.py", line 143, in forward
x = self.conv1(x)
File "C:\Users\zhy34\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in call
result = self.forward(input, **kwargs)
File "C:\Users\zhy34\Anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 353, in forward
return self._conv_forward(input, self.weight)
File "C:\Users\zhy34\Anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 350, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected 4-dimensional input for 4-dimensional weight [64, 3, 7, 7], but got 5-dimensional input of size [128, 10, 3, 44, 44] instead
` The dataset I'm using is FER2013, the biggest change I have made is "train_loader" and "val_loader". Can author or any friends help me? Any comments are appreciated.