浏览代码

clean up docstrings create policies

/develop/add-fire/doc-cleanups
Andrew Cohen 4 年前
当前提交
e7c9ff35
共有 2 个文件被更改,包括 13 次插入5 次删除
  1. 9
      ml-agents/mlagents/trainers/ppo/trainer.py
  2. 9
      ml-agents/mlagents/trainers/sac/trainer.py

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


create_graph: bool = False,
) -> TFPolicy:
"""
Creates a PPO policy to trainers list of policies.
Creates a policy with a Tensorflow backend and PPO hyperparameters
:param parsed_behavior_id:
:param create_graph: whether to create the graph when policy is constructed
:param create_graph: whether to create the tensorflow graph on construction
:return policy
"""
policy = TFPolicy(

self, parsed_behavior_id: BehaviorIdentifiers, behavior_spec: BehaviorSpec
) -> TorchPolicy:
"""
Creates a PPO policy to trainers list of policies.
Creates a policy with a PyTorch backend and PPO hyperparameters
:param brain_parameters: specifications for policy construction
:param behavior_spec: specifications for policy construction
:return policy
"""
policy = TorchPolicy(

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


behavior_spec: BehaviorSpec,
create_graph: bool = False,
) -> TFPolicy:
"""
Creates a policy with a Tensorflow backend and SAC hyperparameters
:param parsed_behavior_id:
:param behavior_spec: specifications for policy construction
:param create_graph: whether to create the tensorflow graph on construction
:return policy
"""
policy = TFPolicy(
self.seed,
behavior_spec,

self, parsed_behavior_id: BehaviorIdentifiers, behavior_spec: BehaviorSpec
) -> TorchPolicy:
"""
Creates a PPO policy to trainers list of policies.
Creates a policy with a PyTorch backend and SAC hyperparameters
:param parsed_behavior_id:
:param behavior_spec: specifications for policy construction
:return policy

正在加载...
取消
保存