浏览代码

Redundant indexing

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

2
ml-agents/mlagents/trainers/torch/networks.py


# Resize to (batch, sequence length, encoding size)
encoding = encoding.reshape([-1, sequence_length, self.h_size])
memories = torch.split(memories, self.m_size // 2, dim=-1)
encoding, memories = self.lstm(encoding, (memories[0], memories[1]))
encoding, memories = self.lstm(encoding, memories)
encoding = encoding.reshape([-1, self.m_size // 2])
memories = torch.cat(memories, dim=-1)
return encoding, memories

正在加载...
取消
保存