RElbers / info-nce-pytorch

PyTorch implementation of the InfoNCE loss for self-supervised learning.
MIT License
445 stars 37 forks source link

reduction mode #1

Closed XA-kirino closed 3 years ago

XA-kirino commented 3 years ago

Thx for your implementation! Have you ever considered about setting the reduction mode, it seems that can be easily modified.

RElbers commented 3 years ago

I have added the reduction mode as a parameter.