mindspore-lab / mindaudio

A toolbox of audio models and algorithms based on MindSpore
Apache License 2.0
35 stars 9 forks source link

预训练的模型怎么加载使用和提取向量呢 #177

Open lonngxiang opened 8 months ago

lonngxiang commented 8 months ago

https://github.com/mindspore-lab/mindaudio/blob/main/examples/ECAPA-TDNN/README_CN.md

image

LiTingyu1997 commented 3 months ago

1.下载weights下的ckpt文件,在yaml配置文件中将pre_trained设置为True,并配置正确的checkpoint_path即可加载预训练模型。

LiTingyu1997 commented 3 months ago

2.from mindaudio.models.ecapatdnn import EcapaTDNN,并如speaker_verification_cosine.py文件中加载训练好的模型,使用此函数进行推理,即可提取向量。