class_docstr: Gaussian LSTM Policy.
  
  A policy represented by a Gaussian distribution
  which is parameterized by a Long short-term memory (LSTM).
  
  Args:
      env_spec (garage.envs.env_spec.EnvSpec): Environment specification.
      name (str): Model name, also the variable scope.
      hidden_dim (int): Hidden dimension for LSTM cell for mean.
      hidden_nonlinearity (Callable): Activation function for intermediate
          dense layer(s). It should return a tf.Tensor. Set it to
          None to maintain a linear activation.
      hidden_w_init (Callable): Initializer function for the weight
          of intermediate dense layer(s). The function should return a
          tf.Tensor.
      hidden_b_init (Callable): Initializer function for the bias
          of intermediate dense layer(s). The function should return a
          tf.Tensor.
      recurrent_nonlinearity (Callable): Activation function for recurrent
          layers. It should return a tf.Tensor. Set it to None to
          maintain a linear activation.
      recurrent_w_init (Callable): Initializer function for the weight
          of recurrent layer(s). The function should return a
          tf.Tensor.
      output_nonlinearity (Callable): Activation function for output dense
          layer. It should return a tf.Tensor. Set it to None to
          maintain a linear activation.
      output_w_init (Callable): Initializer function for the weight
          of output dense layer(s). The function should return a
          tf.Tensor.
      output_b_init (Callable): Initializer function for the bias
          of output dense layer(s). The function should return a
          tf.Tensor.
      hidden_state_init (Callable): Initializer function for the
          initial hidden state. The functino should return a tf.Tensor.
      hidden_state_init_trainable (bool): Bool for whether the initial
          hidden state is trainable.
      cell_state_init (Callable): Initializer function for the
          initial cell state. The functino should return a tf.Tensor.
      cell_state_init_trainable (bool): Bool for whether the initial
          cell state is trainable.
      forget_bias (bool): If True, add 1 to the bias of the forget gate at
          initialization. It's used to reduce the scale of forgetting at the
          beginning of the training.
      learn_std (bool): Is std trainable.
      std_share_network (bool): Boolean for whether mean and std share
          the same network.
      init_std (float): Initial value for std.
      layer_normalization (bool): Bool for using layer normalization or not.
      state_include_action (bool): Whether the state includes action.
          If True, input dimension will be
          (observation dimension + action dimension).
class_docstr_tok: ["Gaussian","LSTM","Policy",".","A","policy","represented","by","a","Gaussian","distribution","which","is","parameterized","by","a","Long","short-term","memory","(","LSTM",")",".","Args",":","env_spec","(","garage.envs.env_spec.EnvSpec",")",":","Environment","specification",".","name","(","str",")",":","Model","name",",","also","the","variable","scope",".","hidden_dim","(","int",")",":","Hidden","dimension","for","LSTM","cell","for","mean",".","hidden_nonlinearity","(","Callable",")",":","Activation","function","for","intermediate","dense","layer","(","s",")",".","It","should","return","a","tf.Tensor",".","Set","it","to","None","to","maintain","a","linear","activation",".","hidden_w_init","(","Callable",")",":","Initializer","function","for","the","weight","of","intermediate","dense","layer","(","s",")",".","The","function","should","return","a","tf.Tensor",".","hidden_b_init","(","Callable",")",":","Initializer","function","for","the","bias","of","intermediate","dense","layer","(","s",")",".","The","function","should","return","a","tf.Tensor",".","recurrent_nonlinearity","(","Callable",")",":","Activation","function","for","recurrent","layers",".","It","should","return","a","tf.Tensor",".","Set","it","to","None","to","maintain","a","linear","activation",".","recurrent_w_init","(","Callable",")",":","Initializer","function","for","the","weight","of","recurrent","layer","(","s",")",".","The","function","should","return","a","tf.Tensor",".","output_nonlinearity","(","Callable",")",":","Activation","function","for","output","dense","layer",".","It","should","return","a","tf.Tensor",".","Set","it","to","None","to","maintain","a","linear","activation",".","output_w_init","(","Callable",")",":","Initializer","function","for","the","weight","of","output","dense","layer","(","s",")",".","The","function","should","return","a","tf.Tensor",".","output_b_init","(","Callable",")",":","Initializer","function","for","the","bias","of","output","dense","layer","(","s",")",".","The","function","should","return","a","tf.Tensor",".","hidden_state_init","(","Callable",")",":","Initializer","function","for","the","initial","hidden","state",".","The","functino","should","return","a","tf.Tensor",".","hidden_state_init_trainable","(","bool",")",":","Bool","for","whether","the","initial","hidden","state","is","trainable",".","cell_state_init","(","Callable",")",":","Initializer","function","for","the","initial","cell","state",".","The","functino","should","return","a","tf.Tensor",".","cell_state_init_trainable","(","bool",")",":","Bool","for","whether","the","initial","cell","state","is","trainable",".","forget_bias","(","bool",")",":","If","True",",","add","1","to","the","bias","of","the","forget","gate","at","initialization",".","It","'s","used","to","reduce","the","scale","of","forgetting","at","the","beginning","of","the","training",".","learn_std","(","bool",")",":","Is","std","trainable",".","std_share_network","(","bool",")",":","Boolean","for","whether","mean","and","std","share","the","same","network",".","init_std","(","float",")",":","Initial","value","for","std",".","layer_normalization","(","bool",")",":","Bool","for","using","layer","normalization","or","not",".","state_include_action","(","bool",")",":","Whether","the","state","includes","action",".","If","True",",","input","dimension","will","be","(","observation","dimension","+","action","dimension",")","."]
code: def __init__(
      self,
      env_spec,
      hidden_dim=32,
      name="GaussianLSTMPolicy",
      hidden_nonlinearity=tf.nn.tanh,
      hidden_w_init=tf.initializers.glorot_uniform(
          seed=deterministic.get_tf_seed_stream()
      ),
      hidden_b_init=tf.zeros_initializer(),
      recurrent_nonlinearity=tf.nn.sigmoid,
      recurrent_w_init=tf.initializers.glorot_uniform(
          seed=deterministic.get_tf_seed_stream()
      ),
      output_nonlinearity=None,
      output_w_init=tf.initializers.glorot_uniform(
          seed=deterministic.get_tf_seed_stream()
      ),
      output_b_init=tf.zeros_initializer(),
      hidden_state_init=tf.zeros_initializer(),
      hidden_state_init_trainable=False,
      cell_state_init=tf.zeros_initializer(),
      cell_state_init_trainable=False,
      forget_bias=True,
      learn_std=True,
      std_share_network=False,
      init_std=1.0,
      layer_normalization=False,
      state_include_action=True,
  ):
      if not isinstance(env_spec.action_space, akro.Box):
          raise ValueError(
              "GaussianLSTMPolicy only works with "
              "akro.Box action space, but not {}".format(
                  env_spec.action_space
              )
          )
  
      self._env_spec = env_spec
      self._obs_dim = env_spec.observation_space.flat_dim
      self._action_dim = env_spec.action_space.flat_dim
  
      self._hidden_dim = hidden_dim
      self._hidden_nonlinearity = hidden_nonlinearity
      self._hidden_w_init = hidden_w_init
      self._hidden_b_init = hidden_b_init
      self._recurrent_nonlinearity = recurrent_nonlinearity
      self._recurrent_w_init = recurrent_w_init
      self._output_nonlinearity = output_nonlinearity
      self._output_w_init = output_w_init
      self._output_b_init = output_b_init
      self._hidden_state_init = hidden_state_init
      self._hidden_state_init_trainable = hidden_state_init_trainable
      self._cell_state_init = cell_state_init
      self._cell_state_init_trainable = cell_state_init_trainable
      self._forget_bias = forget_bias
      self._learn_std = learn_std
      self._std_share_network = std_share_network
      self._init_std = init_std
      self._layer_normalization = layer_normalization
      self._state_include_action = state_include_action
  
      self._f_step_mean_std = None
  
      if state_include_action:
          self._input_dim = self._obs_dim + self._action_dim
      else:
          self._input_dim = self._obs_dim
  
      super().__init__(
          output_dim=self._action_dim,
          hidden_dim=hidden_dim,
          name=name,
          hidden_nonlinearity=hidden_nonlinearity,
          hidden_w_init=hidden_w_init,
          hidden_b_init=hidden_b_init,
          recurrent_nonlinearity=recurrent_nonlinearity,
          recurrent_w_init=recurrent_w_init,
          output_nonlinearity=output_nonlinearity,
          output_w_init=output_w_init,
          output_b_init=output_b_init,
          hidden_state_init=hidden_state_init,
          hidden_state_init_trainable=hidden_state_init_trainable,
          cell_state_init=cell_state_init,
          cell_state_init_trainable=cell_state_init_trainable,
          forget_bias=forget_bias,
          layer_normalization=layer_normalization,
          learn_std=learn_std,
          std_share_network=std_share_network,
          init_std=init_std,
      )
  
      self._prev_actions = None
      self._prev_hiddens = None
      self._prev_cells = None
      self._init_hidden = None
      self._init_cell = None
  
      self._initialize_policy()
  
imports: import akro
  import numpy
  import tensorflow
  from garage.experiment import deterministic
  from garage.tf.models import GaussianLSTMModel
  from garage.tf.policies.policy import Policy
label_desc: Use image node_id 1 to create a new GaussianLSTMPolicy object from inherited base classes: GaussianLSTMModel, Policy with example: obj = GaussianLSTMPolicy(env_spec, hidden_dim, name, hidden_nonlinearity, hidden_w_init, hidden_b_init, recurrent_nonlinearity, recurrent_w_init, output_nonlinearity, output_w_init, output_b_init, hidden_state_init, hidden_state_init_trainable, cell_state_init, cell_state_init_trainable, forget_bias, learn_std, std_share_network, init_std, layer_normalization, state_include_action)