mit-han-lab / temporal-shift-module

[ICCV 2019] TSM: Temporal Shift Module for Efficient Video Understanding
https://arxiv.org/abs/1811.08383
MIT License
2.07k stars 417 forks source link

How to fine-tune with 'TSM_kinetics_RGB_mobilenetv2_shift8_blockres_avg_segment8_e100_dense.pth' #160

Open soolone opened 4 years ago

soolone commented 4 years ago

I want to fine-tune on my dataset with 'TSM_kinetics_RGB_mobilenetv2_shift8_blockres_avg_segment8_e100_dense.pth' I can train successfully with 'TSM_kinetics_RGB_mobilenetv2_shift8_blockres_avg_segment8_e100_dense.pth' , but when I train with command: python main.py mydata RGB \ --arch mobilenetv2 --num_segments 8 \ --gd 20 --lr 0.001 --lr_steps 10 20 --epochs 25 \ --batch-size 8 -j 16 --dropout 0.8 --consensus_type=avg --eval-freq=1 \ --shift --shift_div=8 --shift_place=blockres \ --tune_from=pretrained/TSM_kinetics_RGB_mobilenetv2_shift8_blockres_avg_segment8_e100_dense.pth

I got error: Traceback (most recent call last): File "main.py", line 378, in main() File "main.py", line 123, in main model.load_state_dict(model_dict) File "/home/cgim/anaconda3/envs/centernet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 830, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for DataParallel: Unexpected key(s) in state_dict: "base_model.features.0.0.weight",...

What should I change?

Fritskee commented 3 years ago

Are you training on GPU? I remember having a DataParallel issue when I didn't initialize my GPUs.

didpurwanto commented 3 years ago

Any solution for this problem?

dengfenglai321 commented 2 years ago

how to download TSM_kinetics_RGB_mobilenetv2_shift8_blockres_avg_segment8_e100_dense.pth??