浏览代码

add type/docstring to slice

/develop/action-slice
Andrew Cohen 3 年前
当前提交
cb13a8ca
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 6
      ml-agents/mlagents/trainers/torch/agent_action.py

6
ml-agents/mlagents/trainers/torch/agent_action.py


else:
return torch.empty(0)
def slice(self, start, end):
def slice(self, start: int, end: int) -> "AgentAction":
"""
Returns an AgentAction with the continuous and discrete tensors slices
from index start to index end.
"""
_cont = None
_disc_list = []
if self.continuous_tensor is not None:

正在加载...
取消
保存