class_docstr: Basic next-frame model, may take actions and predict rewards too.
class_docstr_tok: ["Basic","next-frame","model",",","may","take","actions","and","predict","rewards","too","."]
code: def middle_network(self, layer, internal_states):
      # Run a stack of convolutions.
      activation_fn = common_layers.belu
      if self.hparams.activation_fn == "relu":
          activation_fn = tf.nn.relu
      x = layer
      kernel1 = (3, 3)
      filters = common_layers.shape_list(x)[-1]
      for i in range(self.hparams.num_hidden_layers):
          with tf.variable_scope("layer%d" % i):
              y = tf.nn.dropout(x, 1.0 - self.hparams.residual_dropout)
              y = tf.layers.conv2d(
                  y,
                  filters,
                  kernel1,
                  activation=activation_fn,
                  strides=(1, 1),
                  padding="SAME",
              )
              if i == 0:
                  x = y
              else:
                  x = common_layers.layer_norm(x + y)
      return x, internal_states
  
file_path: tensor2tensor/tensor2tensor/models/video/basic_deterministic.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.layers import discretization
  from tensor2tensor.models.video import base
  from tensor2tensor.models.video import basic_deterministic_params
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the NextFrameBasicDeterministic obj's underlying member method code with example usage: obj.middle_network(layer, internal_states) and returns: x,  internal_states