code: def __init__(
      self,
      env: "TradingEnvironment",
      shared_network: tf.keras.Model = None,
      actor_network: tf.keras.Model = None,
      critic_network: tf.keras.Model = None,
  ):
      self.env = env
      self.n_actions = env.action_space.n
      self.observation_shape = env.observation_space.shape
  
      self.shared_network = (
          shared_network or self._build_shared_network()
      )
      self.actor_network = actor_network or self._build_actor_network()
      self.critic_network = (
          critic_network or self._build_critic_network()
      )
  
      self.env.agent_id = self.id
  
file_path: tensortrade/tensortrade/agents/a2c_agent.py
imports: from deprecated import deprecated
  import random
  import numpy
  import tensorflow
  from collections import namedtuple
  from tensortrade.agents import Agent, ReplayMemory
  from datetime import datetime
label_desc: Use image node_id 1 to create a new A2CAgent object from inherited base classes: Agent with example: obj = A2CAgent(env, shared_network, actor_network, critic_network)