hellojialee / Improved-Body-Parts

Simple Pose: Rethinking and Improving a Bottom-up Approach for Multi-Person Pose Estimation
https://arxiv.org/abs/1911.10529
258 stars 42 forks source link

Doesn't run without GPU #15

Closed allenday closed 4 years ago

allenday commented 4 years ago
$ ls link2checkpoints_distributed/
PoseNet_52_epoch_without_optimizer_statue.pth
$ python3 ./demo_image.py --resume --opt-level O0 --image ~/in.jpg --output ~/out.jpg
[...]
Traceback (most recent call last):
  File "./demo_image.py", line 631, in <module>
    loss_scale=args.loss_scale)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/apex-0.1-py3.6.egg/apex/amp/frontend.py", line 358, in initialize
    return _initialize(models, optimizers, _amp_state.opt_properties, num_losses, cast_model_outputs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/apex-0.1-py3.6.egg/apex/amp/_initialize.py", line 171, in _initialize
    check_params_fp32(models)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/apex-0.1-py3.6.egg/apex/amp/_initialize.py", line 93, in check_params_fp32
    name, param.type()))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/apex-0.1-py3.6.egg/apex/amp/_amp_state.py", line 32, in warn_or_err
    raise RuntimeError(msg)
RuntimeError: Found param posenet.pre.conv1.weight with type torch.FloatTensor, expected torch.cuda.FloatTensor.
When using amp.initialize, you need to provide a model with parameters
located on a CUDA device before passing it no matter what optimization level
you chose. Use model.to('cuda') to use the default device.

Please advise.

hellojialee commented 4 years ago

Hi @allenday, thank you for your interest. The used train_distributed.py (distributed training with Apex) only considers training model using GPU just as the README said.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.