code: def __init__(self, model, config):
      # checks
      assert isinstance(config["vf_loss_coeff"], (int, float))
      check_model_method(model, "value", self.__class__.__name__)
      check_model_method(model, "policy", self.__class__.__name__)
      check_model_method(
          model, "policy_and_value", self.__class__.__name__
      )
  
      self.model = model
      self.vf_loss_coeff = config["vf_loss_coeff"]
      self.optimizer = optim.Adam(
          self.model.parameters(), lr=config["learning_rate"]
      )
      self.config = config
  
file_path: PARL/parl/algorithms/torch/a2c.py
imports: import torch
  from torch.distributions import Categorical
  import torch.nn.functional
  import torch.optim
  import numpy
  import parl
  from parl.utils.utils import check_model_method
label_desc: Use image node_id 1 to create a new A2C object from inherited base classes: parl with example: obj = A2C(model, config)