code: def __init__(self, config):
      self.config = config
  
      # =========== Create Agent ==========
      env = gym.make(config["env_name"])
      env = wrap_deepmind(env, dim=config["env_dim"], obs_format="NCHW")
      obs_shape = env.observation_space.shape
      act_dim = env.action_space.n
      self.config["obs_shape"] = obs_shape
      self.config["act_dim"] = act_dim
  
      model = AtariModel(act_dim)
      algorithm = A2C(model, vf_loss_coeff=config["vf_loss_coeff"])
      self.agent = AtariAgent(algorithm, config)
  
      # ========== Learner ==========
  
      self.total_loss_stat = WindowStat(100)
      self.pi_loss_stat = WindowStat(100)
      self.vf_loss_stat = WindowStat(100)
      self.entropy_stat = WindowStat(100)
      self.lr = None
      self.entropy_coeff = None
  
      self.learn_time_stat = TimeStat(100)
      self.start_time = None
  
      # ========== Remote Actor ===========
      self.sample_total_steps = 0
      self.create_actors()
  
file_path: PARL/examples/A2C/train.py
imports: import gym
  import numpy
  import time
  import parl
  from atari_model import AtariModel
  from atari_agent import AtariAgent
  from collections import defaultdict
  from parl.env.atari_wrappers import wrap_deepmind
  from parl.utils import logger, summary
  from parl.utils.time_stat import TimeStat
  from parl.utils.window_stat import WindowStat
  from actor import Actor
  from parl.algorithms import A2C
label_desc: Use image node_id 1 to create a new Learner object from inherited base classes: object with example: obj = Learner(config)