DeNA / Chainer_Realtime_Multi-Person_Pose_Estimation

Chainer version of Realtime Multi-Person Pose Estiamtion
Other
431 stars 94 forks source link

Train with the `resume` option fails #21

Closed shunsuke227ono closed 6 years ago

shunsuke227ono commented 6 years ago

Hi, I'm sorry for creating several issues, but i think different problems should be on different issues. Now I'm trying to run train script with --resume option, but it does not work.

I did this command: python3 train_coco_pose_estimation.py --gpu 0 --out result/20171213/ --resume result/20171206/model_iter_560000 (result/20171206/model_iter_560000 is my model file created by training procedure)

and I get this error

ono@xxxx:~/Chainer_Realtime_Multi-Person_Pose_Estimation⟫ python3 train_coco_pose_estimation.py --gpu 0 --out result/20171213/ --resume result/20171206/model_iter_560000
Copying params of pretrained model...
Done.
loading annotations into memory...
Done (t=7.98s)
creating index...
index created!
loading annotations into memory...
Done (t=0.96s)
creating index...
index created!
train images: 64115
val images: 100
Traceback (most recent call last):
  File "train_coco_pose_estimation.py", line 205, in <module>
    chainer.serializers.load_npz(args.resume, trainer)
  File "/home/ono/.local/lib/python3.5/site-packages/chainer/serializers/npz.py", line 152, in load_npz
    d.load(obj)
  File "/home/ono/.local/lib/python3.5/site-packages/chainer/serializer.py", line 83, in load
    obj.serialize(self)
  File "/home/ono/.local/lib/python3.5/site-packages/chainer/training/trainer.py", line 325, in serialize
    self.updater.serialize(serializer['updater'])
  File "/home/ono/.local/lib/python3.5/site-packages/chainer/training/updater.py", line 243, in serialize
    iterator.serialize(serializer['iterator:' + name])
  File "/home/ono/.local/lib/python3.5/site-packages/chainer/iterators/multiprocess_iterator.py", line 152, in serialize
    self.current_position)
  File "/home/ono/.local/lib/python3.5/site-packages/chainer/serializers/npz.py", line 115, in __call__
    dataset = self.npz[key]
  File "/home/ono/.local/lib/python3.5/site-packages/numpy/lib/npyio.py", line 237, in __getitem__
    raise KeyError("%s is not a file in the archive" % key)
KeyError: 'updater/iterator:main/current_position is not a file in the archive'

I'm still debuggin by myself, but if you have any idea about this, I would like to know it. Thank you!

shunsuke227ono commented 6 years ago

Oh sorry, this is just my wrong way of using the option. I should use initmodel for model, instead of resume