Open jxVoidreaver opened 2 years ago
请问您解决了吗?我也遇到了这个问题
Hi @tjusyy
可能是 timm版本问题。 更新timm就行。
Please update your timm and try it again
您好,timm更新到0.5.4也不行,请问您是哪个版本
我尝试在0.4.12和0.5.4版本运行,都是同样的问题
https://github.com/layumi/Person_reID_baseline_pytorch/blob/master/model.py#L121
要更新到 0.6.0以上。timm 改写法了。
pip install git+https://github.com/rwightman/pytorch-image-models.git
非常感谢,问题已经解决。 安装timm最新版本:pip install timm==0.6.2.dev0 使用pip updata只能更新到0.5.4版本
使用swin训练出现问题: Epoch 0/59
Traceback (most recent call last): File "/home/bder73002/phf/Person_reID_baseline_pytorch-master/train.py", line 523, in
model = train_model(model, criterion, optimizer_ft, exp_lr_scheduler,
File "/home/bder73002/phf/Person_reID_baseline_pytorch-master/train.py", line 268, in train_model
outputs = model(inputs)
File "/home/bder73002/anaconda3/envs/python3.9.2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/bder73002/phf/Person_reID_baseline_pytorch-master/model.py", line 122, in forward
x = self.avgpool(x.permute((0,2,1)))
RuntimeError: number of dims don't match in permute