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

ValueError: not enough values to unpack (expected 5, got 3) #64

Closed A7777-gp closed 2 years ago

A7777-gp commented 2 years ago

Hi writer, I encountered an error in running train.py,How should I modify it? Thank you for your answer!!!

Test phase, Epoch: 0 Traceback (most recent call last): File "train.py", line 206, in test(epoch, show_image=False) File "train.py", line 178, in test images, mask_misses, heatmaps, offsets, mask_offsets = target_tuple ValueError: not enough values to unpack (expected 5, got 3)

hellojialee commented 2 years ago

Sorry, train.py was abandoned, please try train_distributed.py.

A7777-gp commented 2 years ago

Sorry, train.py was abandoned, please try train_distributed.py.

thanks! but i get another error.....

Warning: multi_tensor_applier fused unscale kernel is unavailable, possibly because apex was installed without --cuda_ext --cpp_ext. Using Python fallback. Original ImportError was: ModuleNotFoundError("No module named 'amp_C'",) Resuming from checkpoint ...... Network weights have been resumed from checkpoint... Traceback (most recent call last): File "train_distributed.py", line 197, in resume() File "train_distributed.py", line 181, in resume optimizer.load_state_dict(checkpoint['optimizer_weight']) File "/scratch/mool/ana3/envs/gpp/lib/python3.6/site-packages/torch/optim/optimizer.py", line 143, in load_state_dict for k, v in state_dict['state'].items(): KeyError: 'state'

A7777-gp commented 2 years ago

I tried to modify the code,But the results are still wrong.Could you take a look at it for me, please.Thanks!!!!!

hellojialee commented 2 years ago

Hi, probably you should install Apex with: pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ or python [setup.py](http://setup.py/) install --cuda_ext --cpp_ext

Please refer to https://github.com/NVIDIA/apex.

A7777-gp commented 2 years ago

Hi, probably you should install Apex with: pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ or python [setup.py](http://setup.py/) install --cuda_ext --cpp_ext

Please refer to https://github.com/NVIDIA/apex.

OK,What version of CUDA and Pytorch are you using? The reason for this error is that the PyTorch version is low,but in the requirements.txt,pytorch is 1.1.0😭,My CUDA version is 10.0.it can run the train.py,can not run train_distributed.py.

hellojialee commented 2 years ago

I was using CUDA 10.2. But PyTorch and Apex should support the legacy.

stale[bot] commented 2 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.