class_docstr: This similarity function simply computes the dot product between each pair of vectors, with an
  optional scaling to reduce the variance of the output elements.
  
  Parameters
  ----------
  scale_output : ``bool``, optional
      If ``True``, we will scale the output by ``math.sqrt(tensor.size(-1))``, to reduce the
      variance in the result.
code: def forward(self, tensor_1, tensor_2):
      result = (tensor_1 * tensor_2).sum(dim=-1)
      if self._scale_output:
          result *= math.sqrt(tensor_1.size(-1))
      return result
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/similarity_functions/dot_product.py
imports: from __future__ import absolute_import
  import math
  import torch
  from allennlp.modules.similarity_functions.similarity_function import SimilarityFunction
label_desc: Use image node_id 2 for calling the DotProductSimilarity obj's underlying member method code with example usage: obj.forward(tensor_1, tensor_2) and returns: result