jefflai108 / Contrastive-Predictive-Coding-PyTorch

Contrastive Predictive Coding for Automatic Speaker Verification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Second last tilmestep as the c_t in the baseline model?

KinWaiCheuk opened this issue · comments

At Line 310, you have the following code

output, hidden = self.gru(forward_seq, hidden) # output size e.g. 8*100*256
c_t = output[:,t_samples,:].view(batch, 256) # c_t e.g. size 8*256

So you are using the second last timestep as c_t? Since the last timestep should be output[:,t_samples+1,:], or just simply hidden.

As far as I understand from the original paper, c_t should be the last timestep. Am I missing anything here?