File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
ml-agents/mlagents/trainers/optimizer Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def _evaluate_by_sequence(
88
88
# For the first sequence, the initial memory should be the one at the
89
89
# beginning of this trajectory.
90
90
for _ in range (first_seq_len ):
91
- all_next_memories .append (initial_memory .squeeze (). detach (). numpy ( ))
91
+ all_next_memories .append (ModelUtils . to_numpy ( initial_memory .squeeze ()))
92
92
93
93
init_values , _mem = self .critic .critic_pass (
94
94
seq_obs , initial_memory , sequence_length = first_seq_len
@@ -105,7 +105,7 @@ def _evaluate_by_sequence(
105
105
):
106
106
seq_obs = []
107
107
for _ in range (self .policy .sequence_length ):
108
- all_next_memories .append (_mem .squeeze (). detach (). numpy ( ))
108
+ all_next_memories .append (ModelUtils . to_numpy ( _mem .squeeze ()))
109
109
for _obs in tensor_obs :
110
110
start = seq_num * self .policy .sequence_length - (
111
111
self .policy .sequence_length - leftover
You can’t perform that action at this time.
0 commit comments