class_docstr: Computes attention between every entry in matrix_1 with every entry in matrix_2 using cosine
  similarity.
class_docstr_tok: ["Computes","attention","between","every","entry","in","matrix_1","with","every","entry","in","matrix_2","using","cosine","similarity","."]
code: def forward(self, matrix_1, matrix_2):
      a_norm = matrix_1 / (
          matrix_1.norm(p=2, dim=-1, keepdim=True) + 1e-13
      )
      b_norm = matrix_2 / (
          matrix_2.norm(p=2, dim=-1, keepdim=True) + 1e-13
      )
      return torch.bmm(a_norm, b_norm.transpose(-1, -2))
  
imports: from __future__ import division
  from __future__ import absolute_import
  import torch
  from allennlp.modules.matrix_attention.matrix_attention import MatrixAttention
label_desc: Use image node_id 1 for calling the CosineMatrixAttention obj's underlying member method code with example usage: obj.forward(matrix_1, matrix_2) and returns: torch