When I run the code python trainSpeakerNet.py --eval --model TDy_ResNet34_half --log_input True --encoder_type AVG --trainfunc softmaxproto --save_path exps/test --eval_frames 400 --initial_model pretrained_model/pretrained_TDy_ResNet34_half.model, there is an error as follow:
Python Version: 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] PyTorch Version: 1.10.0+cu113 Number of GPUs: 1 Save path: exps/test ############################# TDy_ResNet34_half loaded Temp = 31 K = 6 ############################# Embedding size is 512, encoder AVG. Initialised Softmax Loss Initialised AngleProto Initialised SoftmaxPrototypical Loss Initialised Adam optimizer Initialised step LR scheduler Traceback (most recent call last): File "trainSpeakerNet.py", line 285, in <module> main() File "trainSpeakerNet.py", line 281, in main main_worker(0, None, args) File "trainSpeakerNet.py", line 170, in main_worker trainer.loadParameters(args.initial_model) File "C:\Users\Administrator\Desktop\Lis\temporal_dynamic_cnn-main\SpeakerNet.py", line 270, in loadParameters loaded_state = torch.load(path, map_location="cuda:%d"%self.gpu)['model_state_dict'] File "C:\Users\Administrator\.conda\envs\pytorch\lib\site-packages\torch\serialization.py", line 608, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "C:\Users\Administrator\.conda\envs\pytorch\lib\site-packages\torch\serialization.py", line 777, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.
When I run the code
python trainSpeakerNet.py --eval --model TDy_ResNet34_half --log_input True --encoder_type AVG --trainfunc softmaxproto --save_path exps/test --eval_frames 400 --initial_model pretrained_model/pretrained_TDy_ResNet34_half.model
, there is an error as follow:Python Version: 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] PyTorch Version: 1.10.0+cu113 Number of GPUs: 1 Save path: exps/test ############################# TDy_ResNet34_half loaded Temp = 31 K = 6 ############################# Embedding size is 512, encoder AVG. Initialised Softmax Loss Initialised AngleProto Initialised SoftmaxPrototypical Loss Initialised Adam optimizer Initialised step LR scheduler Traceback (most recent call last): File "trainSpeakerNet.py", line 285, in <module> main() File "trainSpeakerNet.py", line 281, in main main_worker(0, None, args) File "trainSpeakerNet.py", line 170, in main_worker trainer.loadParameters(args.initial_model) File "C:\Users\Administrator\Desktop\Lis\temporal_dynamic_cnn-main\SpeakerNet.py", line 270, in loadParameters loaded_state = torch.load(path, map_location="cuda:%d"%self.gpu)['model_state_dict'] File "C:\Users\Administrator\.conda\envs\pytorch\lib\site-packages\torch\serialization.py", line 608, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "C:\Users\Administrator\.conda\envs\pytorch\lib\site-packages\torch\serialization.py", line 777, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.