MingjieChen / DYGANVC

demo page https://MingjieChen.github.io/dygan-vc
67 stars 9 forks source link

Error in extract vqwav2vec features #2

Closed jerrymatjila closed 2 years ago

jerrymatjila commented 2 years ago

cp in https://github.com/MingjieChen/DYGANVC/blob/189591a3e560434603604c6cc67841aa499016c0/vqwv2vec_feat_extract.py#L36 is not defined. I suppose it means path to checkpoint vq-wav2vec_kmeans.pt.

However, my attempt of loading checkpoint gives `KeyError: 'binary_cross_entropy'.

File "/storage/usr/conda/envs/dyganvc/lib/python3.7/site-packages/fairseq/checkpoint_utils.py", line 279, in load_model_ensemble_and_task
state = load_checkpoint_to_cpu(filename, arg_overrides)
File "/storage/usr/conda/envs/dyganvc/lib/python3.7/site-packages/fairseq/checkpoint_utils.py", line 232, in load_checkpoint_to_cpu
state = _upgrade_state_dict(state)
File "/storage/usr/conda/envs/dyganvc/lib/python3.7/site-packages/fairseq/checkpoint_utils.py", line 439, in _upgrade_state_dict
cls = REGISTRY["registry"][choice]
KeyError: 'binary_cross_entropy'
$ python -c "import fairseq;print(fairseq.__version__)"
0.10.2

Any idea on how to fix this?

jerrymatjila commented 2 years ago

Well this https://github.com/pytorch/fairseq/issues/3256#issuecomment-895702893 solved it.