class_docstr: Implementation of the Negative Cosine Simililarity used in the SimSiam[0] paper.
  
  [0] SimSiam, 2020, https://arxiv.org/abs/2011.10566
  
  Examples:
  
      >>> # initialize loss function
      >>> loss_fn = NegativeCosineSimilarity()
      >>>
      >>> # generate two representation tensors
      >>> # with batch size 10 and dimension 128
      >>> x0 = torch.randn(10, 128)
      >>> x1 = torch.randn(10, 128)
      >>>
      >>> # calculate loss
      >>> loss = loss_fn(x0, x1)
class_docstr_tok: ["Implementation","of","the","Negative","Cosine","Simililarity","used","in","the","SimSiam","[","0","]","paper",".","[","0","]","SimSiam",",","2020",",","https",":","\/\/arxiv.org\/abs\/2011.10566","Examples",":",">",">",">","#","initialize","loss","function",">",">",">","loss_fn","=","NegativeCosineSimilarity","(",")",">",">",">",">",">",">","#","generate","two","representation","tensors",">",">",">","#","with","batch","size","10","and","dimension","128",">",">",">","x0","=","torch.randn","(","10",",","128",")",">",">",">","x1","=","torch.randn","(","10",",","128",")",">",">",">",">",">",">","#","calculate","loss",">",">",">","loss","=","loss_fn","(","x0",",","x1",")"]
code: def forward(self, x0: torch.Tensor, x1: torch.Tensor) -> torch.Tensor:
      return -cosine_similarity(x0, x1, self.dim, self.eps).mean()
  
imports: import torch
  from torch.nn.functional import cosine_similarity
label_desc: Use image node_id 2 for calling the NegativeCosineSimilarity obj's underlying member method code with example usage: obj.forward(x0, x1) and returns: unknown