使用voc格式数据集训练poolformer 时两个报
报错1:
return torch._C._nn.linear(input, weight, bias)
RuntimeError: mat1 dim 1 must match mat2 dim 0
解决办法是模型的in_channels要与模型本身匹配,我开始使用的是2048,就报这个错了,改成768后就正常了
报错2:
由于使用的优化器是adamw,查了资料后发现,是pytorch代码bug导致的,github上已经修复
local variable ‘beta1‘ referenced before assignment
将pytorch 的代码按照github上的对应代码文件修改一下即可
总共涉及三个文件: