In math cosine distance (or similarity) is calculated as

But according to pytorch documentation, it’s calulated as
https://pytorch.org/docs/master/nn.html?highlight=cosine#torch.nn.CosineSimilarity 6
Can someone explain the difference, please?