class_docstr: Attention Layer: input shape should be[batch_size, seq_length, feature_dim]
code: def att_head(self, seq, out_size, activation):
      seq_fts = tf.layers.conv1d(seq, out_size, 1, use_bias=False)
      f_1 = tf.layers.conv1d(seq_fts, 1, 1, use_bias=False)
      f_2 = tf.layers.conv1d(seq_fts, 1, 1, use_bias=False)
      logits = f_1 + tf.transpose(f_2, [0, 2, 1])
      coefs = tf.nn.softmax(tf.nn.leaky_relu(logits))
      vals = tf.matmul(coefs, seq_fts)
      ret = tf.contrib.layers.bias_add(vals)
      return activation(ret)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import tensorflow
  from tensorflow.python.util import nest
label_desc: Use image node_id 3 for calling the AttLayer obj's underlying member method code with example usage: obj.att_head(seq, out_size, activation) and returns: activation