Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DeepTiming opened this issue Apr 25, 2019 · 4 comments

Comments

@DeepTiming
Copy link

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
Copy link

Getting same, Kindly suggest

@docketrun
Copy link

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
Copy link

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

@akira-john
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants