dangweili / pedestrian-attribute-recognition-pytorch

A simple baseline for pedestrian attribute recognition in surveillance scenarios
334 stars 81 forks source link

继续之前的权重训练,出现这个问题,想问下大概什么原因呢?谢谢 #20

Open DeepTiming opened 5 years ago

DeepTiming commented 5 years ago

Resume from ckpt E:/backup/gitlab/pedestrian-attribute-recognition-pytorch/exp/deepmar_resnet50/joint/partition0/run1/model/ckpt_epoch20.pth, epoch: 20, scores: 0 Traceback (most recent call last): File "./script/experiment/train_deepmar_resnet50.py", line 322, in transfer_optim_state(state=optimizer.state, device_id=0) File "E:\backup\gitlab\pedestrian-attribute-recognition-pytorch\script\experiment\baseline\utils\utils.py", line 201, in transfer_optim_state transfer_optim_state(val, device_id=device_id) File "E:\backup\gitlab\pedestrian-attribute-recognition-pytorch\script\experiment\baseline\utils\utils.py", line 203, in transfer_optim_state raise RuntimeError("Oops, state[{}] is a Variable!".format(key)) RuntimeError: Oops, state[momentum_buffer] is a Variable!

docketrun commented 5 years ago

Getting same, Kindly suggest

docketrun commented 5 years ago

content/drive/My Drive/pedestrian/script/experiment/baseline/model/DeepMAR.py:42: UserWarning: nn.init.normal is now deprecated in favor of nn.init.normal. init.normal(self.classifier.weight, std=0.001) /content/drive/My Drive/pedestrian/script/experiment/baseline/model/DeepMAR.py:43: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant. init.constant(self.classifier.bias, 0) Resume from ckpt ckpt_epoch10.pth, epoch: 10, scores: 0 Traceback (most recent call last): File "./script/experiment/train_deepmar_resnet50.py", line 295, in transfer_optim_state(state=optimizer.state, device_id=0) File "/content/drive/My Drive/pedestrian/script/experiment/baseline/utils/utils.py", line 201, in transfer_optim_state transfer_optim_state(val, device_id=device_id) File "/content/drive/My Drive/pedestrian/script/experiment/baseline/utils/utils.py", line 203, in transfer_optim_state raise RuntimeError("Oops, state[{}] is a Variable!".format(key)) RuntimeError: Oops, state[momentum_buffer] is a `Variable!```

liuhl-source commented 5 years ago

@DeepTiming @docketrun @dangweili I got the same. >.< how to deal with it, thx!

akira-john commented 5 years ago

I can solve the problem by commenting out "./script/experiment/train_deepmar_resnet50.py" line 295, though I can't understand how this line would function.