class_docstr: Batch of environments inside the TensorFlow graph.
  
  The batch of environments will be stepped and reset inside of the graph using
  a tf.py_func(). The current batch of observations, actions, rewards, and done
  flags are held in according variables.
docstr: Batch of environments inside the TensorFlow graph.
docstr_tok: ["Batch","of","environments","inside","the","TensorFlow","graph","."]
code: def __init__(
      self,
      reward_range,
      observation_space,
      action_space,
      frame_stack_size,
      frame_height,
      frame_width,
      initial_frame_chooser,
      batch_size,
      model_name,
      model_hparams,
      model_dir,
      intrinsic_reward_scale=0.0,
      sim_video_dir=None,
  ):
      """Batch of environments inside the TensorFlow graph."""
      super(SimulatedBatchEnv, self).__init__(
          observation_space, action_space
      )
  
      self._ffmpeg_works = common_video.ffmpeg_works()
      self.batch_size = batch_size
      self._min_reward = reward_range[0]
      self._num_frames = frame_stack_size
      self._intrinsic_reward_scale = intrinsic_reward_scale
      self._episode_counter = tf.get_variable(
          "episode_counter",
          initializer=tf.zeros((), dtype=tf.int32),
          trainable=False,
          dtype=tf.int32,
      )
      if sim_video_dir:
          self._video_every_epochs = 100
          self._video_dir = sim_video_dir
          self._video_writer = None
          self._video_counter = 0
          tf.gfile.MakeDirs(self._video_dir)
          self._video_condition = tf.equal(
              self._episode_counter.read_value()
              % self._video_every_epochs,
              0,
          )
      else:
          self._video_condition = tf.constant(
              False, dtype=tf.bool, shape=()
          )
  
      model_hparams = copy.copy(model_hparams)
      problem = DummyWorldModelProblem(
          action_space, reward_range, frame_height, frame_width
      )
      trainer_lib.add_problem_hparams(model_hparams, problem)
      model_hparams.force_full_predict = True
      self._model = registry.model(model_name)(
          model_hparams, tf_estimator.ModeKeys.PREDICT
      )
  
      self.history_buffer = HistoryBuffer(
          initial_frame_chooser,
          self.observ_shape,
          self.observ_dtype,
          self._num_frames,
          self.batch_size,
      )
  
      self._observ = tf.Variable(
          tf.zeros(
              (batch_size,) + self.observ_shape, self.observ_dtype
          ),
          trainable=False,
      )
  
      self._reset_model = tf.get_variable(
          "reset_model",
          [],
          trainable=False,
          initializer=tf.zeros_initializer(),
      )
  
      self._model_dir = model_dir
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import os
  import numpy
  from tensor2tensor.data_generators.gym_env import DummyWorldModelProblem
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.rl.envs import in_graph_batch_env
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import trainer_lib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 to create a new SimulatedBatchEnv object from inherited base classes: in_graph_batch_env with example: obj = SimulatedBatchEnv(reward_range, observation_space, action_space, frame_stack_size, frame_height, frame_width, initial_frame_chooser, batch_size, model_name, model_hparams, model_dir, intrinsic_reward_scale, sim_video_dir)