Skip to content

Commit

Permalink
Add comment to ghost trainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ervin Teng committed Dec 18, 2020
1 parent afd7476 commit 292b6ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ml-agents/mlagents/trainers/torch/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def critic_pass(
if self.use_lstm:
# Use only the back half of memories for critic
actor_mem, critic_mem = torch.split(memories, self.memory_size // 2, -1)
all_net_inputs = [net_inputs]
all_net_inputs = []
if critic_obs is not None:
all_net_inputs.extend(critic_obs)
value_outputs, critic_mem_out = self.critic(
Expand Down Expand Up @@ -601,7 +601,7 @@ def get_stats_and_value(
net_inputs, memories=actor_mem, sequence_length=sequence_length
)
log_probs, entropies = self.action_model.evaluate(encoding, masks, actions)
all_net_inputs = [net_inputs]
all_net_inputs = []
if critic_obs is not None:
all_net_inputs.extend(critic_obs)
value_outputs, critic_mem_outs = self.critic(
Expand All @@ -627,7 +627,7 @@ def get_action_stats_and_value(
critic_mem = None
actor_mem = None

all_net_inputs = [net_inputs]
all_net_inputs = []
if critic_obs is not None:
all_net_inputs.extend(critic_obs)

Expand Down

0 comments on commit 292b6ce

Please sign in to comment.