when I train tsn-pytorch use the following command:
python main.py ucf101 RGB /home/xu/Datasets/ucfTrainTestlist/trainlist01.txt /home/xu/Datasets/ucfTrainTestlist/testlist01.txt --arch BNInception --num_segments 3 --gd 20 --lr 0.001 --lr_steps 30 60 --epochs 80 -b 16 -j 2 --dropout 0.8 --snapshot_pref ucf101_bninception_
however, it show:
Initializing TSN with base model: BNInception.
TSN Configurations:
input_modality: RGB
num_segments: 3
new_length: 1
consensus_module: avg
dropout_ratio: 0.8
Traceback (most recent call last):
File "main.py", line 301, in <module>
main()
File "main.py", line 35, in main
consensus_type=args.consensus_type, dropout=args.dropout, partial_bn=not args.no_partialbn)
File "/home/xu/HAR/project/TSN/tsn-pytorch/models.py", line 39, in __init__
self._prepare_base_model(base_model)
File "/home/xu/HAR/project/TSN/tsn-pytorch/models.py", line 96, in _prepare_base_model
self.base_model = getattr(tf_model_zoo, base_model)()
File "/home/xu/HAR/project/TSN/tsn-pytorch/tf_model_zoo/bninception/pytorch_load.py", line 35, in __init__
self.load_state_dict(torch.utils.model_zoo.load_url(weight_url))
File "/home/xu/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for BNInception:
size mismatch for conv1_7x7_s2_bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
size mismatch for conv1_7x7_s2_bn.bias: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
size mismatch for conv1_7x7_s2_bn.running_mean: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
size mismatch for conv1_7x7_s2_bn.running_var: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
...
size mismatch for inception_5b_pool_proj_bn.running_var: copying a param of torch.Size([128]) from checkpoint, where the shape is torch.Size([1, 128]) in current model.
I need help with this.help is appreciated
Regards