code: def build_forward(
      self,
      encoder_output,
      encoder_state,
      is_training,
      decision_trajectory,
  ):
      self._define_input()
      self.decision, self.probs = [], []
  
      batch_size = array_ops.shape(encoder_output)[0]
      if self.attention_config is None:
          cell = self.build_decoder_cell(encoder_state)
          cell_state = encoder_state
          cell_input = tf.zeros(shape=[batch_size], dtype=tf.int32)
          with tf.variable_scope("deeper_actor"):
              for _i in range(self.decision_num):
                  cell_input_embed = embedding(
                      cell_input,
                      1 if _i == 0 else self.out_dims[_i - 1],
                      self.embedding_dim,
                      name="deeper_actor_embedding_%d" % _i,
                  )
                  with tf.variable_scope("rnn", reuse=(_i > 0)):
                      cell_output, cell_state = cell(
                          cell_input_embed, cell_state
                      )
                  with tf.variable_scope("classifier_%d" % _i):
                      logits_i = BasicModel.fc_layer(
                          cell_output, self.out_dims[_i], use_bias=True
                      )
                  act_i = "softmax"
                  probs_i = BasicModel.activation(
                      logits_i, activation=act_i
                  )  # [batch_size, out_dim_i]
                  if _i == 1:
                      # determine the layer index for deeper actor
                      # require mask
                      one_hot_block_decision = tf.one_hot(
                          cell_input,
                          depth=self.out_dims[0],
                          dtype=tf.int32,
                      )
                      max_layer_num = tf.multiply(
                          self.block_layer_num, one_hot_block_decision
                      )
                      max_layer_num = tf.reduce_max(
                          max_layer_num, axis=1
                      )  # [batch_size]
                      layer_mask = tf.sequence_mask(
                          max_layer_num,
                          self.out_dims[1],
                          dtype=tf.float32,
                      )
                      probs_i = tf.multiply(probs_i, layer_mask)
                      # rescale the sum to 1
                      probs_i = tf.divide(
                          probs_i,
                          tf.reduce_sum(
                              probs_i, axis=1, keep_dims=True
                          ),
                      )
                  decision_i = tf.multinomial(
                      tf.log(probs_i), 1
                  )  # [batch_size, 1]
                  decision_i = tf.cast(decision_i, tf.int32)
                  decision_i = tf.reshape(
                      decision_i, shape=[-1]
                  )  # [batch_size]
  
                  cell_input = tf.cond(
                      is_training,
                      lambda: decision_trajectory[:, _i],
                      lambda: decision_i,
                  )
                  self.decision.append(decision_i)
                  self.probs.append(probs_i)
              self.decision = tf.stack(
                  self.decision, axis=1
              )  # [batch_size, decision_num]
      else:
          raise NotImplementedError
  
imports: import tensorflow
  from tensorflow.contrib import rnn
  from tensorflow.python.ops import array_ops
  from ..models.basic_model import BasicModel
  import numpy
  import os
label_desc: Use image node_id 4 for calling the DeeperActorNet obj's underlying member method code with example usage: obj.build_forward(encoder_output, encoder_state, is_training, decision_trajectory) without return types