浏览代码

Skip critic when given empty memory array

/develop/skipcritic
Ervin Teng 4 年前
当前提交
98948c59
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/policy/torch_policy.py

2
ml-agents/mlagents/trainers/policy/torch_policy.py


:return: Tuple of actions, actions clipped to -1, 1, log probabilities (dependent on all_log_probs),
entropies, and output memories, all as Torch Tensors.
"""
if memories is None:
if memories is None or memories.numel() == 0:
dists, memories = self.actor_critic.get_dists(
vec_obs, vis_obs, masks, memories, seq_len
)

正在加载...
取消
保存