浏览代码

Small performance improvement during inference

/develop/add-fire
Arthur Juliani 5 年前
当前提交
039f545a
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      ml-agents/mlagents/trainers/policy/torch_policy.py

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


)
run_out = {}
action, log_probs, entropy, value_heads, memories = self.sample_actions(
vec_obs, vis_obs, masks=masks, memories=memories
)
with torch.no_grad():
action, log_probs, entropy, value_heads, memories = self.sample_actions(
vec_obs, vis_obs, masks=masks, memories=memories
)
run_out["action"] = action.detach().numpy()
run_out["pre_action"] = action.detach().numpy()
# Todo - make pre_action difference

正在加载...
取消
保存