class_docstr: Encode a sequence by averaging the input embeddings.
class_docstr_tok: ["Encode","a","sequence","by","averaging","the","input","embeddings","."]
code: def embed(self, inputs, mask):
      inputs = inputs * tf.expand_dims(mask, -1)
      counts = tf.reduce_sum(mask, -1, keep_dims=True)
      sum_inp = tf.reduce_sum(inputs, axis=1)
      output = sum_inp / tf.maximum(counts, 1)
      self.add_to_collection("output", output)
      return output
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import utils
label_desc: Use image node_id 2 for calling the AverageSeqEncoder obj's underlying member method code with example usage: obj.embed(inputs, mask) and returns: output