浏览代码

Clean up nn_policy

/develop/nopreviousactions
Ervin Teng 4 年前
当前提交
8abd4129
共有 2 个文件被更改,包括 1 次插入7 次删除
  1. 6
      ml-agents/mlagents/trainers/common/nn_policy.py
  2. 2
      ml-agents/mlagents/trainers/tf_policy.py

6
ml-agents/mlagents/trainers/common/nn_policy.py


:param resample: Whether we are using the resampling trick to update the policy in continuous output.
"""
super().__init__(seed, brain, trainer_params, load)
self.stats_name_to_update_name = {
"Losses/Value Loss": "value_loss",
"Losses/Policy Loss": "policy_loss",
}
self.tf_optimizer: Optional[tf.train.Optimizer] = None
self.grads = None
self.update_batch: Optional[tf.Operation] = None

2
ml-agents/mlagents/trainers/tf_policy.py


class TFPolicy(Policy):
"""
Contains a learning model, and the necessary
functions to interact with it to perform evaluate and updating.
functions to save/load models and create the input placeholders.
"""
possible_output_nodes = [

正在加载...
取消
保存