def __init__(self, config): DDQN.__init__(self, config) self.memory = Prioritised_Replay_Buffer(self.hyperparameters, config.seed) if config.resume: self.load_resume(config.resume_path)
def __init__(self, config, agent_name_=agent_name): DDQN.__init__(self, config, agent_name_=agent_name_) self.q_network_local = self.create_NN(input_dim=self.state_size, output_dim=self.action_size + 1) self.q_network_optimizer = optim.Adam(self.q_network_local.parameters(), lr=self.hyperparameters["learning_rate"], eps=1e-4) self.q_network_target = self.create_NN(input_dim=self.state_size, output_dim=self.action_size + 1) Base_Agent.copy_model_over(from_model=self.q_network_local, to_model=self.q_network_target) self.wandb_watch(self.q_network_local, log_freq=self.config.wandb_model_log_freq)
def __init__(self, config): DDQN.__init__(self, config) model_path = self.config.model_path if self.config.model_path else 'Models' self.q_network_local = self.create_NN(input_dim=self.state_size, output_dim=self.action_size + 1) self.q_network_local_path = os.path.join(model_path, "{}_q_network_local.pt".format(self.agent_name)) if self.config.load_model: self.locally_load_policy() self.q_network_optimizer = optim.Adam(self.q_network_local.parameters(), lr=self.hyperparameters["learning_rate"], eps=1e-4) self.q_network_target = self.create_NN(input_dim=self.state_size, output_dim=self.action_size + 1) Base_Agent.copy_model_over(from_model=self.q_network_local, to_model=self.q_network_target)
def __init__(self, config, agent_name_=agent_name): DDQN.__init__(self, config, agent_name_=agent_name_) self.memory = Prioritised_Replay_Buffer(self.hyperparameters, config.seed)
def __init__(self, config): DDQN.__init__(self, config) self.memory = Prioritised_Replay_Buffer(self.hyperparameters, config.seed, config.use_GPU)