xvector_pytorch icon indicating copy to clipboard operation
xvector_pytorch copied to clipboard

hello,i have a question is that how to extract embedding a,b

Open quyuquan2019 opened this issue 4 years ago • 4 comments

from you code xvector-gpu.ipynb , the net construction is :+1: Sequential( (0): TDNN() (1): TDNN() (2): TDNN() (3): TDNN() (4): TDNN() (5): StatsPooling() (6): FullyConnected( (hidden1): Linear(in_features=3000, out_features=512, bias=True) (hidden2): Linear(in_features=512, out_features=512, bias=True)))

but the code "output= net(torch.tensor(X_test[100:120]).cuda())" is extract embedding b, how extract embedding a? and i dont understand why you spit X_text from 100:120 ?

thanks

quyuquan2019 avatar May 12 '20 06:05 quyuquan2019

Hey, what do you mean by embedding a exactly ? The embedding from the first dense layer ? Also ive chosen 20 frames from 100 to 120 randomly to extract embedding on, it could receive sequance of mfcc of any length (80:100, 10:60 , 0:20 etc)

Dannynis avatar May 13 '20 21:05 Dannynis

yes ,thanks,my friend, you code help me . now ,i start use my trainset to train this net. embedding a is hidden1 's output , and embedding b is hidden 2 ' s output and i find out how to extact embedding b from you code but confusion of how to embedding a and i have other question is what time you train this net ?

quyuquan2019 avatar May 14 '20 01:05 quyuquan2019

hey, currently is not comfortable to extract it, im working on version that will be more continent, meanwhile you could try pyannote package

Dannynis avatar Jul 06 '20 19:07 Dannynis

Cool, I hope the author can make a use of pyannote to do x-vector tutorial

quyuquan2019 avatar Jul 23 '20 01:07 quyuquan2019