class_docstr: This similarity function simply computes the cosine similarity between each pair of vectors.  It has
  no parameters.
class_docstr_tok: ["This","similarity","function","simply","computes","the","cosine","similarity","between","each","pair","of","vectors",".","It","has","no","parameters","."]
code: def forward(self, tensor_1, tensor_2):
      normalized_tensor_1 = tensor_1 / tensor_1.norm(
          dim=-1, keepdim=True
      )
      normalized_tensor_2 = tensor_2 / tensor_2.norm(
          dim=-1, keepdim=True
      )
      return (normalized_tensor_1 * normalized_tensor_2).sum(dim=-1)
  
imports: from __future__ import division
  from __future__ import absolute_import
  import torch
  from allennlp.modules.similarity_functions.similarity_function import SimilarityFunction
label_desc: Use image node_id 1 for calling the CosineSimilarity obj's underlying member method code with example usage: obj.forward(tensor_1, tensor_2) and returns: unknown