class_docstr: Computes attention between a vector and a matrix using dot product.
class_docstr_tok: ["Computes","attention","between","a","vector","and","a","matrix","using","dot","product","."]
code: def _forward_internal(self, vector, matrix):
      return matrix.bmm(vector.unsqueeze(-1)).squeeze(-1)
  
imports: from __future__ import absolute_import
  import torch
  from allennlp.modules.attention.legacy_attention import Attention
label_desc: Use image node_id 1 for calling the DotProductAttention obj's underlying member method code with example usage: obj._forward_internal(vector, matrix) and returns: matrix