class_docstr: DotAttention
class_docstr_tok: ["DotAttention"]
docstr: :param s: [src_sequence_length, batch_size, src_dim]
  :param prob: [src_sequence_length, batch_size]            or [tgt_sequence_length, src_sequence_length, batch_size]
  :return: [batch_size, src_dim] or [tgt_sequence_length, batch_size, src_dim]
docstr_tok: [":","param","s",":","[","src_sequence_length",",","batch_size",",","src_dim","]",":","param","prob",":","[","src_sequence_length",",","batch_size","]","or","[","tgt_sequence_length",",","src_sequence_length",",","batch_size","]",":","return",":","[","batch_size",",","src_dim","]","or","[","tgt_sequence_length",",","batch_size",",","src_dim","]"]
code: def get_att(self, s, prob):
      """
          :param s: [src_sequence_length, batch_size, src_dim]
          :param prob: [src_sequence_length, batch_size]\
              or [tgt_sequence_length, src_sequence_length, batch_size]
          :return: [batch_size, src_dim] or [tgt_sequence_length, batch_size, src_dim]
          """
      buf = s * tf.expand_dims(prob, axis=-1)
      att = tf.reduce_sum(buf, axis=-3)
      return att
  
file_path: nni/examples/trials/ga_squad/attention.py
imports: import math
  import tensorflow
  from tensorflow.python.ops.rnn_cell_impl import RNNCell
label_desc: Use image node_id 12 for calling the DotAttention obj's underlying member method code with example usage: obj.get_att(s, prob) and returns: att