In the wav2vec2 implementation, the above line of code tends to sample negatives from somewhere else instead of the current position.
but it will fail when set negatives_from_everywhere to be True.
I know that will be overlooked when compute logits. but it is not consistent with the scenarios when negatives_from_everywhere is False, which may be an error cause.
https://github.com/pytorch/fairseq/blob/148327d8c1e3a5f9d17a11bbb1973a7cf3f955d3/fairseq/models/wav2vec/wav2vec2.py#L397
In the wav2vec2 implementation, the above line of code tends to sample negatives from somewhere else instead of the current position.
but it will fail when set
negatives_from_everywhere
to beTrue
.I know that will be overlooked when compute logits. but it is not consistent with the scenarios when
negatives_from_everywhere
isFalse
, which may be an error cause.