open-mmlab / mmskeleton

A OpenMMLAB toolbox for human pose estimation, skeleton-based action recognition, and action synthesis.
Apache License 2.0
2.93k stars 1.04k forks source link

Error when loading the model #296

Closed ferisetiawan closed 4 years ago

ferisetiawan commented 4 years ago

When I run the testing code

mmskl configs/recognition/st_gcn_aaai18/kinetics-skeleton/test.yaml --checkpoint ./work_dir/recognition/ST_GCN_18/kinetics-skeleton/epoch_50.pth --gpus 2

I found this error

RuntimeError: don't know how to restore data location of torch.FloatStorage (tagged with gpu)

Do you have any suggestions? The code is running on my pc with 2 GPUs (RTX2080ti)

Thankyou!

ferisetiawan commented 4 years ago

Problem solved. I did some changes on the map_location parameter during the load_checkpoint.

eng100200 commented 4 years ago

@ferisetiawan what changes you made in map_location?

abhi1nandy2 commented 4 years ago

Problem solved. I did some changes on the map_location parameter during the load_checkpoint.

Please show the changes that you made to the map location. Help would be much appreciated 👍

Ooo02zzZ commented 3 years ago

Problem solved. I did some changes on the map_location parameter during the load_checkpoint. Maybe this puzzle will be resolved by this blog. https://www.cnblogs.com/xiaodai0/p/10413711.html

RPetitpierre commented 1 year ago

Replacing 'gpu' by 'cuda:0' in load_checkpoint did the trick: load_checkpoint(model, cfg.load_from, map_location='cuda:0')