jefflai108 / Contrastive-Predictive-Coding-PyTorch

Contrastive Predictive Coding for Automatic Speaker Verification
MIT License
472 stars 96 forks source link

Second last tilmestep as the c_t in the baseline model? #18

Open KinWaiCheuk opened 3 years ago

KinWaiCheuk commented 3 years ago

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?