jefflai108 / Contrastive-Predictive-Coding-PyTorch

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

Hey should 'correct' only be if the final prediction was correct? Same for accuracy? #15

Open colinator opened 3 years ago

colinator commented 3 years ago

https://github.com/jefflai108/Contrastive-Predictive-Coding-PyTorch/blob/a9dab4e759aaa68dce1b1ada46a8035076ba3296/src/model/model.py#L100

Meaning, should that correct variable be += ?

NeteeraAF commented 3 years ago

I noticed that too.

I think you're right, and after the loop over the timesteps, the sum should be divided by batch_size*num_of_timesteps.