class_docstr: The A2C (Advantage Actor Critic) model class, https://arxiv.org/abs/1602.01783
  
  :param policy: (ActorCriticPolicy or str) The policy model to use (MlpPolicy, CnnPolicy, CnnLstmPolicy, ...)
  :param env: (Gym environment or str) The environment to learn from (if registered in Gym, can be str)
  :param gamma: (float) Discount factor
  :param n_steps: (int) The number of steps to run for each environment per update
      (i.e. batch size is n_steps * n_env where n_env is number of environment copies running in parallel)
  :param vf_coef: (float) Value function coefficient for the loss calculation
  :param ent_coef: (float) Entropy coefficient for the loss calculation
  :param max_grad_norm: (float) The maximum value for the gradient clipping
  :param learning_rate: (float) The learning rate
  :param alpha: (float)  RMSProp decay parameter (default: 0.99)
  :param momentum: (float) RMSProp momentum parameter (default: 0.0)
  :param epsilon: (float) RMSProp epsilon (stabilizes square root computation in denominator of RMSProp update)
      (default: 1e-5)
  :param lr_schedule: (str) The type of scheduler for the learning rate update ('linear', 'constant',
                            'double_linear_con', 'middle_drop' or 'double_middle_drop')
  :param verbose: (int) the verbosity level: 0 none, 1 training information, 2 tensorflow debug
  :param tensorboard_log: (str) the log location for tensorboard (if None, no logging)
  :param _init_setup_model: (bool) Whether or not to build the network at the creation of the instance
                            (used only for loading)
  :param policy_kwargs: (dict) additional arguments to be passed to the policy on creation
  :param full_tensorboard_log: (bool) enable additional logging when using tensorboard
      WARNING: this logging can take a lot of space quickly
  :param seed: (int) Seed for the pseudo-random generators (python, numpy, tensorflow).
      If None (default), use random seed. Note that if you want completely deterministic
      results, you must set `n_cpu_tf_sess` to 1.
  :param n_cpu_tf_sess: (int) The number of threads for TensorFlow operations
      If None, the number of cpu of the current machine will be used.
class_docstr_tok: ["The","A2C","(","Advantage","Actor","Critic",")","model","class",",","https",":","\/\/arxiv.org\/abs\/1602.01783",":","param","policy",":","(","ActorCriticPolicy","or","str",")","The","policy","model","to","use","(","MlpPolicy",",","CnnPolicy",",","CnnLstmPolicy",",","...",")",":","param","env",":","(","Gym","environment","or","str",")","The","environment","to","learn","from","(","if","registered","in","Gym",",","can","be","str",")",":","param","gamma",":","(","float",")","Discount","factor",":","param","n_steps",":","(","int",")","The","number","of","steps","to","run","for","each","environment","per","update","(","i.e",".","batch","size","is","n_steps","*","n_env","where","n_env","is","number","of","environment","copies","running","in","parallel",")",":","param","vf_coef",":","(","float",")","Value","function","coefficient","for","the","loss","calculation",":","param","ent_coef",":","(","float",")","Entropy","coefficient","for","the","loss","calculation",":","param","max_grad_norm",":","(","float",")","The","maximum","value","for","the","gradient","clipping",":","param","learning_rate",":","(","float",")","The","learning","rate",":","param","alpha",":","(","float",")","RMSProp","decay","parameter","(","default",":","0.99",")",":","param","momentum",":","(","float",")","RMSProp","momentum","parameter","(","default",":","0.0",")",":","param","epsilon",":","(","float",")","RMSProp","epsilon","(","stabilizes","square","root","computation","in","denominator","of","RMSProp","update",")","(","default",":","1e-5",")",":","param","lr_schedule",":","(","str",")","The","type","of","scheduler","for","the","learning","rate","update","(","'linear","'",",","'constant","'",",","'double_linear_con","'",",","'middle_drop","'","or","'double_middle_drop","'",")",":","param","verbose",":","(","int",")","the","verbosity","level",":","0","none",",","1","training","information",",","2","tensorflow","debug",":","param","tensorboard_log",":","(","str",")","the","log","location","for","tensorboard","(","if","None",",","no","logging",")",":","param","_init_setup_model",":","(","bool",")","Whether","or","not","to","build","the","network","at","the","creation","of","the","instance","(","used","only","for","loading",")",":","param","policy_kwargs",":","(","dict",")","additional","arguments","to","be","passed","to","the","policy","on","creation",":","param","full_tensorboard_log",":","(","bool",")","enable","additional","logging","when","using","tensorboard","WARNING",":","this","logging","can","take","a","lot","of","space","quickly",":","param","seed",":","(","int",")","Seed","for","the","pseudo-random","generators","(","python",",","numpy",",","tensorflow",")",".","If","None","(","default",")",",","use","random","seed",".","Note","that","if","you","want","completely","deterministic","results",",","you","must","set","`","n_cpu_tf_sess","`","to","1.",":","param","n_cpu_tf_sess",":","(","int",")","The","number","of","threads","for","TensorFlow","operations","If","None",",","the","number","of","cpu","of","the","current","machine","will","be","used","."]
code: def set_env(self, env):
      super().set_env(env)
      self.n_batch = self.n_envs * self.n_steps
  
imports: import time
  import gym
  import numpy
  import tensorflow
  from stable_baselines import logger
  from stable_baselines.common import explained_variance, tf_util, ActorCriticRLModel, SetVerbosity, TensorboardWriter
  from stable_baselines.common.policies import ActorCriticPolicy, RecurrentActorCriticPolicy
  from stable_baselines.common.runners import AbstractEnvRunner
  from stable_baselines.common.schedules import Scheduler
  from stable_baselines.common.tf_util import mse, total_episode_reward_logger
  from stable_baselines.common.math_util import safe_mean
label_desc: Use image node_id 6 for calling the A2C obj's underlying member method code with example usage: obj.set_env(env) without return types