microsoft / muzic

Muzic: Music Understanding and Generation with Artificial Intelligence
MIT License
4.56k stars 453 forks source link

【MusicBERT】ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's group #180

Open Viki520 opened 11 months ago

Viki520 commented 11 months ago

Although fairseq was installed after #37, running bash train_mask.sh lmd_full small gives me the following issue, how can I fix it?

Traceback (most recent call last): File "/home/zhangjunwei/miniconda3/envs/MusicBERT/bin/fairseq-train", line 33, in sys.exit(load_entry_point('fairseq', 'console_scripts', 'fairseq-train')()) File "/home/zhangjunwei/muzic-main/musicbert/fairseq/fairseq_cli/train.py", line 441, in cli_main distributed_utils.call_main(cfg, main) File "/home/zhangjunwei/muzic-main/musicbert/fairseq/fairseq/distributed_utils.py", line 336, in call_main main(cfg, **kwargs) File "/home/zhangjunwei/muzic-main/musicbert/fairseq/fairseq_cli/train.py", line 120, in main disable_iterator_cache=task.has_sharded_data("train"), File "/home/zhangjunwei/muzic-main/musicbert/fairseq/fairseq/checkpoint_utils.py", line 201, in load_checkpoint reset_meters=reset_meters, File "/home/zhangjunwei/muzic-main/musicbert/fairseq/fairseq/trainer.py", line 374, in load_checkpoint self.optimizer.load_state_dict(last_optim_state, optimizer_overrides) File "/home/zhangjunwei/muzic-main/musicbert/fairseq/fairseq/optim/fairseq_optimizer.py", line 86, in load_state_dict self.optimizer.load_state_dict(state_dict) File "/home/zhangjunwei/miniconda3/envs/MusicBERT/lib/python3.6/site-packages/torch/optim/optimizer.py", line 124, in load_state_dict raise ValueError("loaded state dict contains a parameter group " ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's group

zzz1232311 commented 7 months ago

How can this problem be solved?

zzz1232311 commented 7 months ago

@mlzeng