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

train.py #78

Open
onefishs opened this issue Apr 27, 2022 · 1 comment
Open

train.py #78

onefishs opened this issue Apr 27, 2022 · 1 comment

Comments

@onefishs
Copy link

您好,我想问一下问题,在train.py文件里面,有一行代码是model.train_on_batch(x, y),这里的y是y = np.random.uniform(size=(x.shape[0], 1)),我想请问一下,model.train_on_batch(x, y)中的y不需要是真实标签吗,为什么是随机生成的数组。还请您回答。谢谢

@Walleclipse
Copy link
Owner

由于这个程序主要是训练speaker embedding。 而speaker embedding 主要是通过 triplet loss 训练的。计算triplet loss 的时候我们只需要知道这些语音是否来自同一个人就行,而这个是在处理数据的时候实现的。所以triplet loss 的训练并不需要标签。

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