nit
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
This commit is contained in:
parent
b07d95f0dd
commit
95de8e273d
|
@ -95,6 +95,6 @@ class SACConfig:
|
||||||
"use_tanh_squash": True,
|
"use_tanh_squash": True,
|
||||||
"log_std_min": -5,
|
"log_std_min": -5,
|
||||||
"log_std_max": 2,
|
"log_std_max": 2,
|
||||||
"init_final": 0.01,
|
"init_final": 0.005,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -163,10 +163,10 @@ def serve_actor_service(port=50052):
|
||||||
|
|
||||||
def update_policy_parameters(policy: SACPolicy, parameters_queue: queue.Queue, device):
|
def update_policy_parameters(policy: SACPolicy, parameters_queue: queue.Queue, device):
|
||||||
if not parameters_queue.empty():
|
if not parameters_queue.empty():
|
||||||
logging.debug("[ACTOR] Load new parameters from Learner.")
|
logging.info("[ACTOR] Load new parameters from Learner.")
|
||||||
state_dict = parameters_queue.get()
|
state_dict = parameters_queue.get()
|
||||||
state_dict = move_state_dict_to_device(state_dict, device=device)
|
state_dict = move_state_dict_to_device(state_dict, device=device)
|
||||||
policy.load_state_dict(state_dict)
|
policy.load_state_dict(state_dict, strict=False)
|
||||||
|
|
||||||
|
|
||||||
def act_with_policy(cfg: DictConfig, robot: Robot, reward_classifier: nn.Module):
|
def act_with_policy(cfg: DictConfig, robot: Robot, reward_classifier: nn.Module):
|
||||||
|
|
Loading…
Reference in New Issue