class_docstr: Position Wise feed forward.
class_docstr_tok: ["Position","Wise","feed","forward","."]
docstr: Compute feed forward for the input.
  
  Args:
      input: Input tensor of size `(max_time, batch_size, hidden_dim)`
      mode (optional): A tensor taking value in
          :tf_main:`tf.estimator.ModeKeys <estimator/ModeKeys>`, including
          `TRAIN`, `EVAL`, and `PREDICT`. If `None`, dropout is
          controlled by :func:`texar.tf.global_mode`.
  
  :returns: A tensor output of the position wise feed forward network
docstr_tok: ["Compute","feed","forward","for","the","input",".","Args",":","input",":","Input","tensor","of","size","`","(","max_time",",","batch_size",",","hidden_dim",")","`","mode","(","optional",")",":","A","tensor","taking","value","in",":","tf_main",":","`","tf.estimator.ModeKeys","<","estimator\/ModeKeys",">","`",",","including","`","TRAIN","`",",","`","EVAL","`",",","and","`","PREDICT","`",".","If","`","None","`",",","dropout","is","controlled","by",":","func",":","`","texar.tf.global_mode","`",".",":","returns",":","A","tensor","output","of","the","position","wise","feed","forward","network"]
code: def _build(self, input, mode=None):
      r"""Compute feed forward for the input.
  
      Args:
          input: Input tensor of size `(max_time, batch_size, hidden_dim)`
          mode (optional): A tensor taking value in
              :tf_main:`tf.estimator.ModeKeys <estimator/ModeKeys>`, including
              `TRAIN`, `EVAL`, and `PREDICT`. If `None`, dropout is
              controlled by :func:`texar.tf.global_mode`.
  
      :returns: A tensor output of the position wise feed forward network
      """
      is_training = is_train_mode(mode)
      output = self.linear1(input)
      output = self.dropout(output, training=is_training)
      output = self.linear2(output)
      output = self.dropout(output, training=is_training)
  
      # residual + layer norm
      output = tf.contrib.layers.layer_norm(
          input + output,
          begin_norm_axis=-1,
          scope=self.variable_scope,
          reuse=tf.AUTO_REUSE,
      )
  
      return output
  
imports: import tensorflow
  from texar.tf.core import layers
  from texar.tf.module_base import ModuleBase
  from texar.tf.utils.mode import is_train_mode
label_desc: Use image node_id 3 for calling the PositionWiseFF obj's underlying member method code with example usage: obj._build(input, mode) and returns: output