浏览代码

Use zeros_like

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

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


memories = None
next_memories = None
# Q network memories are 0'ed out, since we don't have them during inference.
q_memories = torch.zeros(
(memories.shape[0], memories.shape[1], memories.shape[2] // 2)
)
q_memories = torch.zeros_like(next_memories)
vis_obs: List[torch.Tensor] = []
next_vis_obs: List[torch.Tensor] = []

正在加载...
取消
保存