Walleclipse / Deep_Speaker-speaker_recognition_system

Keras implementation of ‘’Deep Speaker: an End-to-End Neural Speaker Embedding System‘’ (speaker recognition)
245 stars 81 forks source link

train.py #78

Open onefishs opened 2 years ago

onefishs commented 2 years ago

您好,我想问一下问题,在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 commented 2 years ago

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