code: def _init(
      self,
      ob_space,
      ac_space,
      hid_size,
      num_hid_layers,
      gaussian_fixed_var=True,
  ):
      assert isinstance(ob_space, gym.spaces.Box)
  
      self.pdtype = pdtype = make_pdtype(ac_space)
      sequence_length = None
  
      ob = U.get_placeholder(
          name="ob",
          dtype=tf.float32,
          shape=[sequence_length] + list(ob_space.shape),
      )
  
      with tf.variable_scope("obfilter"):
          self.ob_rms = RunningMeanStd(shape=ob_space.shape)
  
      with tf.variable_scope("vf"):
          obz = tf.clip_by_value(
              (ob - self.ob_rms.mean) / self.ob_rms.std, -5.0, 5.0
          )
          last_out = obz
          for i in range(num_hid_layers):
              last_out = tf.nn.tanh(
                  tf.layers.dense(
                      last_out,
                      hid_size,
                      name="fc%i" % (i + 1),
                      kernel_initializer=U.normc_initializer(1.0),
                  )
              )
          self.vpred = tf.layers.dense(
              last_out,
              1,
              name="final",
              kernel_initializer=U.normc_initializer(1.0),
          )[:, 0]
  
      with tf.variable_scope("pol"):
          last_out = obz
          for i in range(num_hid_layers):
              last_out = tf.nn.tanh(
                  tf.layers.dense(
                      last_out,
                      hid_size,
                      name="fc%i" % (i + 1),
                      kernel_initializer=U.normc_initializer(1.0),
                  )
              )
          if gaussian_fixed_var and isinstance(
              ac_space, gym.spaces.Box
          ):
              mean = tf.layers.dense(
                  last_out,
                  pdtype.param_shape()[0] // 2,
                  name="final",
                  kernel_initializer=U.normc_initializer(0.01),
              )
              logstd = tf.get_variable(
                  name="logstd",
                  shape=[1, pdtype.param_shape()[0] // 2],
                  initializer=tf.zeros_initializer(),
              )
              pdparam = tf.concat([mean, mean * 0.0 + logstd], axis=1)
          else:
              pdparam = tf.layers.dense(
                  last_out,
                  pdtype.param_shape()[0],
                  name="final",
                  kernel_initializer=U.normc_initializer(0.01),
              )
  
      self.pd = pdtype.pdfromflat(pdparam)
  
      self.state_in = []
      self.state_out = []
  
      stochastic = tf.placeholder(dtype=tf.bool, shape=())
      ac = U.switch(stochastic, self.pd.sample(), self.pd.mode())
      self._act = U.function([stochastic, ob], [ac, self.vpred])
  
file_path: baselines/baselines/ppo1/mlp_policy.py
imports: from baselines.common.mpi_running_mean_std import RunningMeanStd
  import baselines.common.tf_util
  import tensorflow
  import gym
  from baselines.common.distributions import make_pdtype
label_desc: Use image node_id 2 for calling the MlpPolicy obj's underlying member method code with example usage: obj._init(ob_space, ac_space, hid_size, num_hid_layers, gaussian_fixed_var) without return types