jefflai108 / Contrastive-Predictive-Coding-PyTorch

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

Threre might some wrong in validation.py #6

Closed cyl250 closed 4 years ago

cyl250 commented 4 years ago

Hi , Thank you again for this share coding. I found something might wrong in validation.py. When you doing validation, initialing GRU hidden again, this might cause validation loss in log is more than itself. And since it intials GRU hideen every epoch, I think it might impair the performance slightly.

jefflai108 commented 4 years ago

check https://discuss.pytorch.org/t/when-to-initialize-lstm-hidden-state/2323 hidden state is re-initialized for each new sequence.