class_docstr: Basic next-frame recurrent model.
class_docstr_tok: ["Basic","next-frame","recurrent","model","."]
code: def middle_network(self, layer, internal_states):
      lstm_func = common_video.conv_lstm_2d
      hp = self.hparams
  
      lstm_states = internal_states
      if lstm_states is None:
          lstm_states = [None] * hp.num_lstm_layers
  
      # LSTM layers
      x = layer
      for j in range(hp.num_lstm_layers):
          x, lstm_states[j] = lstm_func(
              x, lstm_states[j], hp.num_lstm_filters
          )
      return x, lstm_states
  
file_path: tensor2tensor/tensor2tensor/models/video/basic_recurrent.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_video
  from tensor2tensor.models.video import basic_stochastic
  from tensor2tensor.utils import registry
label_desc: Use image node_id 2 for calling the NextFrameBasicRecurrent obj's underlying member method code with example usage: obj.middle_network(layer, internal_states) and returns: x,  lstm_states