浏览代码

Append the right memories

/develop/rear-pad
Ervin Teng 4 年前
当前提交
f3cec983
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ml-agents/mlagents/trainers/optimizer/torch_optimizer.py

4
ml-agents/mlagents/trainers/optimizer/torch_optimizer.py


1, math.ceil((num_experiences) / (self.policy.sequence_length))
):
seq_obs = []
for _ in range(self.policy.sequence_length):
all_next_memories.append(_mem.squeeze().detach().numpy())
for _obs in tensor_obs:
start = seq_num * self.policy.sequence_length - (
self.policy.sequence_length - leftover

values, _mem = self.critic.critic_pass(
seq_obs, _mem, sequence_length=self.policy.sequence_length
)
for _ in range(self.policy.sequence_length):
all_next_memories.append(_mem.squeeze().detach().numpy())
for signal_name, _val in values.items():
all_values[signal_name].append(_val)

正在加载...
取消
保存