wenet-e2e / wespeaker

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

Loading pretrained weights into torch model #191

Closed vanIvan closed 1 year ago

vanIvan commented 1 year ago

Hello! I was trying to find how to inference ResNet293 pretrained model (this one) in pytorch, however I haven't found how to use it directly to load weights like:

import torch
from wespeaker.models.resnet import ResNet293
state_dict = torch.load('voxceleb_resnet293_LM.zip')
rn293 = ResNet293()
rn293.load_state_dict(state_dict)

Could you please tell, how to do it?

vanIvan commented 1 year ago

I'm sorry, I should have tried unarchiving with unzip