loeweX / Greedy_InfoMax

Code for the paper: Putting An End to End-to-End: Gradient-Isolated Learning of Representations
https://arxiv.org/abs/1905.11786
MIT License
283 stars 36 forks source link

Same permutation for all audio samples? #6

Closed kmalhotra30 closed 4 years ago

kmalhotra30 commented 4 years ago

Hello,

In the 3rd sampling strategy (sampling from same sequence) for audio subtask, I noticed that the permutation of negative samples is same for all audio sequences in the batch. This is not necessarily incorrect, but it can introduce some sort a bias based on locations of negative samples.

I think it would be better to have random permutations for all audio samples and the fix is easy :)

Reference : https://github.com/loeweX/Greedy_InfoMax/blob/21b2aad810f8d895101afc5a5cd34db3e5cbd9ff/GreedyInfoMax/audio/models/loss_InfoNCE.py#L124

loeweX commented 4 years ago

Hi, Thanks for your interest in my repo. How would you fix the sampling?

kmalhotra30 commented 4 years ago

Hey , sorry for the late response! I have opened a pull request! Kindly take a look :)

Thanks Karan