Zoran_Peric:

CosineSimilarity


I think you figured out the answer yourself.
The documentation ( https://pytorch.org/docs/master/nn.html#cosinesimilarity 1.6k ) makes it clear that the default dim is 1.