class_docstr: LSTM Attention Model
class_docstr_tok: ["LSTM","Attention","Model"]
code: def forward(self, input, is_training):
      input_fc = fluid.layers.fc(
          input=input,
          size=self.embedding_size,
          act="tanh",
          bias_attr=ParamAttr(
              regularizer=fluid.regularizer.L2Decay(0.0),
              initializer=fluid.initializer.NormalInitializer(
                  scale=0.0
              ),
          ),
          name="rgb_fc",
      )
  
      lstm_forward_fc = fluid.layers.fc(
          input=input_fc,
          size=self.lstm_size * 4,
          act=None,
          bias_attr=False,
          name="rgb_fc_forward",
      )
  
      lstm_forward, _ = fluid.layers.dynamic_lstm(
          input=lstm_forward_fc,
          size=self.lstm_size * 4,
          is_reverse=False,
          name="rgb_lstm_forward",
      )
  
      lsmt_backward_fc = fluid.layers.fc(
          input=input_fc,
          size=self.lstm_size * 4,
          act=None,
          bias_attr=False,
          name="rgb_fc_backward",
      )
  
      lstm_backward, _ = fluid.layers.dynamic_lstm(
          input=lsmt_backward_fc,
          size=self.lstm_size * 4,
          is_reverse=True,
          name="rgb_lstm_backward",
      )
  
      lstm_concat = fluid.layers.concat(
          input=[lstm_forward, lstm_backward], axis=1
      )
  
      lstm_dropout = fluid.layers.dropout(
          x=lstm_concat,
          dropout_prob=self.drop_rate,
          is_test=(not is_training),
      )
  
      lstm_weight = fluid.layers.fc(
          input=lstm_dropout,
          size=1,
          act="sequence_softmax",
          bias_attr=False,
          name="rgb_weight",
      )
  
      scaled = fluid.layers.elementwise_mul(
          x=lstm_dropout, y=lstm_weight, axis=0
      )
      lstm_pool = fluid.layers.sequence_pool(
          input=scaled, pool_type="sum"
      )
  
      return lstm_pool
  
imports: import paddle.fluid
  from paddle.fluid import ParamAttr
label_desc: Use image node_id 2 for calling the LSTMAttentionModel obj's underlying member method code with example usage: obj.forward(input, is_training) and returns: lstm_pool