浏览代码

Use correct half of memories

/develop/add-fire/memoryclass
Ervin Teng 4 年前
当前提交
8ead82e2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/sac/optimizer_torch.py

2
ml-agents/mlagents/trainers/sac/optimizer_torch.py


offset = 1 if self.policy.sequence_length > 1 else 0
next_memories_list = [
ModelUtils.list_to_tensor(
batch["memory"][i][: self.policy.m_size // 2]
batch["memory"][i][self.policy.m_size // 2 :]
) # only pass value part of memory to target network
for i in range(offset, len(batch["memory"]), self.policy.sequence_length)
]

正在加载...
取消
保存