Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Viki520 opened this issue Dec 12, 2023 · 2 comments

Comments

@Viki520
Copy link

Viki520 commented Dec 12, 2023

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
Copy link

How can this problem be solved?

@zzz1232311
Copy link

@mlzeng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants