- 错误一:
ValueError: Expected input batch_size (1) to match target batch_size (256).
batch size不能被整除。(在训练过程中出现这个错误)
2.错误二:
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 256, 1, 1])
训练还没开始就报错,batch设置为1
3.错误三:
ModuleNotFoundError: No module named '__main__.resnet'; '__main__' is not a package
在模型调用文件中把from .Wheel import Wheel改成 from Wheel import Wheel即可(在模型训练中想单独打印网络结构模型)
4.错误四:
AttributeError: ‘tuple‘object has no attribute ‘log_softmax‘