def _log_creation(self): logger.info("creating a TD3 agent") logger.info("the actor has %d parameters", count_parameters(self._actor)) logger.info("the critic1 has %d parameters", count_parameters(self._critic1)) logger.info("the critic2 has %d parameters", count_parameters(self._critic2))
def _log_creation(self): logger.info("Creating a SAC agent") logger.info("The actor has %d parameters".format( count_parameters(self._actor))) logger.info('The critic1 has %d parameters', count_parameters(self._critic1)) logger.info('The critic2 has %d parameters', count_parameters(self._critic2))
def _log_creation(self): if self._config.is_chef: logger.info('Creating a SAC agent') logger.info('The actor has %d parameters', count_parameters(self._actor)) logger.info('The critic1 has %d parameters', count_parameters(self._critic1)) logger.info('The critic2 has %d parameters', count_parameters(self._critic2))
def _log_creation(self): if self._config.is_chef: logger.info("creating a sac agent") logger.info("the actor has %d parameters", count_parameters(self._actor)) logger.info("the critic1 has %d parameters", count_parameters(self._critic1)) logger.info("the critic2 has %d parameters", count_parameters(self._critic2))
def __init__(self, config, ob_space, ac_space, actor, critic): super().__init__(config, ob_space) self._ac_space = ac_space # build up networks self._actor = actor(config, ob_space, ac_space, config.tanh_policy) self._old_actor = actor(config, ob_space, ac_space, config.tanh_policy) self._critic = critic(config, ob_space) self._network_cuda(config.device) self._actor_optim = optim.Adam(self._actor.parameters(), lr=config.lr_actor) self._critic_optim = optim.Adam(self._critic.parameters(), lr=config.lr_critic) sampler = RandomSampler() self._buffer = ReplayBuffer(['ob', 'ac', 'done', 'rew', 'ret', 'adv', 'ac_before_activation'], config.buffer_size, sampler.sample_func) if config.is_chef: logger.info('Creating a PPO agent') logger.info('The actor has %d parameters', count_parameters(self._actor)) logger.info('The critic has %d parameters', count_parameters(self._critic))
def _log_creation(self): logger.info('creating a DDPG agent') logger.info('the actor has %d parameters', count_parameters(self._actor)) logger.info('the critic has %d parameters', count_parameters(self._critic))
def _log_creation(self): logger.info("Creating a DQN agent") logger.info("The DQN has %d parameters".format( count_parameters(self._dqn)))