浏览代码

Add docstring

/develop-newnormalization
Ervin Teng 5 年前
当前提交
ea49396a
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
      ml-agents/mlagents/trainers/trajectory.py

7
ml-agents/mlagents/trainers/trajectory.py


@staticmethod
def from_observations(obs: List[np.ndarray]) -> "SplitObservations":
"""
Divides a List of numpy arrays into a SplitObservations NamedTuple.
This allows you to access the vector and visual observations directly,
without enumerating the list over and over.
:param obs: List of numpy arrays (observation)
:returns: A SplitObservations object.
"""
vis_obs_indices = []
vec_obs_indices = []
for index, observation in enumerate(obs):

正在加载...
取消
保存