ddlBoJack / emotion2vec

[ACL 2024] Official PyTorch code for extracting features and training downstream models with emotion2vec: Self-Supervised Pre-Training for Speech Emotion Representation
617 stars 43 forks source link

AttributeError: 'NoneType' object has no attribute 'task' #47

Open tqzhou75 opened 1 week ago

tqzhou75 commented 1 week ago

I've tried many versions and encountered this issue every time. I would greatly appreciate it if you could provide a solution. Thank you very much. Traceback (most recent call last): File "/home2/ZZT/emotion2vec-main/scripts/extract_features.py", line 76, in main() File "/home2/ZZT/emotion2vec-main/scripts/extract_features.py", line 44, in main model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([checkpoint_dir]) #加载模型 File "/home2/ZZT/anaconda3/envs/interspeech/lib/python3.8/site-packages/fairseq/checkpoint_utils.py", line 279, in load_model_ensemble_and_task state = load_checkpoint_to_cpu(filename, arg_overrides) File "/home2/ZZT/anaconda3/envs/interspeech/lib/python3.8/site-packages/fairseq/checkpoint_utils.py", line 232, in load_checkpoint_to_cpu state = _upgrade_state_dict(state) File "/home2/ZZT/anaconda3/envs/interspeech/lib/python3.8/site-packages/fairseq/checkpoint_utils.py", line 420, in _upgrade_state_dict state["args"].task = "translation" AttributeError: 'NoneType' object has no attribute 'task'

FayJungkook commented 5 days ago

I have also met this question

tqzhou75 commented 5 days ago

@FayJungkook Hi, were you able to solve this issue?