class_docstr: This class evaluates policy of OpenAI Gym environment.
  
  Parameters
  -----------
  env_name: str
      Gym environment name
  state_mean: list
      Average state values of multiple independent runs.
  state_std: list
      Standard deviation of state values of multiple independent runs.
  num_rollouts: int
      number of independent runs.
  activation: str:
      activation function
  layer_rescaling_coef: float
      Scaling coefficient of output layers
  random_state: int or None
      random state for reproducibility in Gym environment.
class_docstr_tok: ["This","class","evaluates","policy","of","OpenAI","Gym","environment",".","Parameters","--","--","--","--","--","-","env_name",":","str","Gym","environment","name","state_mean",":","list","Average","state","values","of","multiple","independent","runs",".","state_std",":","list","Standard","deviation","of","state","values","of","multiple","independent","runs",".","num_rollouts",":","int","number","of","independent","runs",".","activation",":","str",":","activation","function","layer_rescaling_coef",":","float","Scaling","coefficient","of","output","layers","random_state",":","int","or","None","random","state","for","reproducibility","in","Gym","environment","."]
docstr: Compute loss (average cumulative negative reward) of a given policy.
docstr_tok: ["Compute","loss","(","average","cumulative","negative","reward",")","of","a","given","policy","."]
code: def __call__(self, layers):
      """Compute loss (average cumulative negative reward) of a given policy."""
      returns = []
      for _ in range(self.num_rollouts):
          obs = self.env.reset()
          done = False
          totalr = 0.0
          while not done:
              action = (
                  np.matmul(obs, layers[0])
                  if (self.mean is None)
                  else (
                      np.matmul((obs - self.mean) / self.std, layers[0])
                  )
              )
              action = action * self.layer_rescaling_coef[0]
              for x, r_coef in zip(
                  layers[1:], self.layer_rescaling_coef[1:]
              ):
                  action = (
                      np.matmul(self._activation(action) + 1.0e-3, x)
                      * r_coef
                  )
              if self.noise_level > 0.0:
                  action += (
                      action
                      * self.noise_level
                      * self.random_state.normal(size=action.shape)
                  )
              obs, r, done, _ = self.env.step(action)
              totalr += r
          returns.append(totalr)
  
      return -np.mean(returns)
  
imports: import gym
  import numpy
label_desc: Use image node_id 3 for calling the GenericMujocoEnv obj's underlying member method code with example usage: obj.__call__(layers) and returns: unknown