浏览代码

Get step from policy (#3223)

/release-0.13.1
GitHub 5 年前
当前提交
5bc7531b
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1
      ml-agents/mlagents/trainers/ppo/trainer.py
  2. 1
      ml-agents/mlagents/trainers/sac/trainer.py

1
ml-agents/mlagents/trainers/ppo/trainer.py


if not isinstance(policy, PPOPolicy):
raise RuntimeError("Non-PPOPolicy passed to PPOTrainer.add_policy()")
self.policy = policy
self.step = policy.get_current_step()
def get_policy(self, name_behavior_id: str) -> TFPolicy:
"""

1
ml-agents/mlagents/trainers/sac/trainer.py


if not isinstance(policy, SACPolicy):
raise RuntimeError("Non-SACPolicy passed to SACTrainer.add_policy()")
self.policy = policy
self.step = policy.get_current_step()
def get_policy(self, name_behavior_id: str) -> TFPolicy:
"""

正在加载...
取消
保存