class_docstr: The ACKTR (Actor Critic using Kronecker-Factored Trust Region) model class, https://arxiv.org/abs/1708.05144
  
  :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 nprocs: (int) The number of threads for TensorFlow operations
  
      .. deprecated:: 2.9.0
          Use `n_cpu_tf_sess` instead.
  
  :param n_steps: (int) The number of steps to run for each environment
  :param ent_coef: (float) The weight for the entropy loss
  :param vf_coef: (float) The weight for the loss on the value function
  :param vf_fisher_coef: (float) The weight for the fisher loss on the value function
  :param learning_rate: (float) The initial learning rate for the RMS prop optimizer
  :param max_grad_norm: (float) The clipping value for the maximum gradient
  :param kfac_clip: (float) gradient clipping for Kullback-Leibler
  :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
  :param async_eigen_decomp: (bool) Use async eigen decomposition
  :param kfac_update: (int) update kfac after kfac_update steps
  :param policy_kwargs: (dict) additional arguments to be passed to the policy on creation
  :param gae_lambda: (float) Factor for trade-off of bias vs variance for Generalized Advantage Estimator
      If None (default), then the classic advantage will be used instead of GAE
  :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","ACKTR","(","Actor","Critic","using","Kronecker-Factored","Trust","Region",")","model","class",",","https",":","\/\/arxiv.org\/abs\/1708.05144",":","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","nprocs",":","(","int",")","The","number","of","threads","for","TensorFlow","operations","..","deprecated",":",":","2.9.0","Use","`","n_cpu_tf_sess","`","instead",".",":","param","n_steps",":","(","int",")","The","number","of","steps","to","run","for","each","environment",":","param","ent_coef",":","(","float",")","The","weight","for","the","entropy","loss",":","param","vf_coef",":","(","float",")","The","weight","for","the","loss","on","the","value","function",":","param","vf_fisher_coef",":","(","float",")","The","weight","for","the","fisher","loss","on","the","value","function",":","param","learning_rate",":","(","float",")","The","initial","learning","rate","for","the","RMS","prop","optimizer",":","param","max_grad_norm",":","(","float",")","The","clipping","value","for","the","maximum","gradient",":","param","kfac_clip",":","(","float",")","gradient","clipping","for","Kullback-Leibler",":","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",":","param","async_eigen_decomp",":","(","bool",")","Use","async","eigen","decomposition",":","param","kfac_update",":","(","int",")","update","kfac","after","kfac_update","steps",":","param","policy_kwargs",":","(","dict",")","additional","arguments","to","be","passed","to","the","policy","on","creation",":","param","gae_lambda",":","(","float",")","Factor","for","trade-off","of","bias","vs","variance","for","Generalized","Advantage","Estimator","If","None","(","default",")",",","then","the","classic","advantage","will","be","used","instead","of","GAE",":","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 save(self, save_path, cloudpickle=False):
      data = {
          "gamma": self.gamma,
          "gae_lambda": self.gae_lambda,
          "n_steps": self.n_steps,
          "vf_coef": self.vf_coef,
          "ent_coef": self.ent_coef,
          "vf_fisher_coef": self.vf_fisher_coef,
          "max_grad_norm": self.max_grad_norm,
          "learning_rate": self.learning_rate,
          "kfac_clip": self.kfac_clip,
          "lr_schedule": self.lr_schedule,
          "verbose": self.verbose,
          "policy": self.policy,
          "observation_space": self.observation_space,
          "action_space": self.action_space,
          "n_envs": self.n_envs,
          "n_cpu_tf_sess": self.n_cpu_tf_sess,
          "seed": self.seed,
          "kfac_update": self.kfac_update,
          "_vectorize_action": self._vectorize_action,
          "policy_kwargs": self.policy_kwargs,
      }
  
      params_to_save = self.get_parameters()
  
      self._save_to_file(
          save_path,
          data=data,
          params=params_to_save,
          cloudpickle=cloudpickle,
      )
  
imports: import time
  import warnings
  import tensorflow
  from gym.spaces import Box, Discrete
  from stable_baselines import logger
  from stable_baselines.a2c.a2c import A2CRunner
  from stable_baselines.ppo2.ppo2 import Runner
  from stable_baselines.common.tf_util import mse, total_episode_reward_logger
  from stable_baselines.acktr import kfac
  from stable_baselines.common.schedules import Scheduler
  from stable_baselines.common import explained_variance, ActorCriticRLModel, tf_util, SetVerbosity, TensorboardWriter
  from stable_baselines.common.policies import ActorCriticPolicy, RecurrentActorCriticPolicy
  from stable_baselines.common.math_util import safe_mean
label_desc: Use image node_id 7 for calling the ACKTR obj's underlying member method code with example usage: obj.save(save_path, cloudpickle) without return types