wenet-e2e / wespeaker

Research and Production Oriented Speaker Verification, Recognition and Diarization Toolkit
Apache License 2.0
739 stars 123 forks source link

unexpected tensor: projection.weight #385

Open Genesis1231 opened 3 weeks ago

Genesis1231 commented 3 weeks ago

Has anyone run into this before??

FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. checkpoint = torch.load(path, map_location='cpu')

unexpected tensor: projection.weight

cdliang11 commented 2 days ago

you mean the error of unexpected tensor: projection.weight?

Genesis1231 commented 2 days ago

yea, it has been an warning since the last update

cdliang11 commented 2 days ago

If you use model_init parameter to initialize the model, then only initialize the backbone model, not the projection related parameters. Then, if you want to continue training from the checkpoint, then you need to use checkpoint parameter to initialize the model.

please see: https://github.com/wenet-e2e/wespeaker/blob/4fdc23aad510bae818fb046fd8f9ae262d6efc5e/wespeaker/bin/train.py#L124-L166

Genesis1231 commented 2 days ago

i am not doing any training, the warning comes up whenever i initialize the model: wespeaker.load_model('english') i am not sure what the problem is. system ubuntu 22.02 python 3.10 GPU RTX4090