浏览代码

Make create losses private

/develop/nopreviousactions
Ervin Teng 5 年前
当前提交
da6daebd
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 4
      ml-agents/mlagents/trainers/ppo/optimizer.py
  2. 4
      ml-agents/mlagents/trainers/sac/optimizer.py

4
ml-agents/mlagents/trainers/ppo/optimizer.py


self.learning_rate = LearningModel.create_learning_rate(
lr_schedule, lr, self.policy.global_step, int(max_step)
)
self.create_losses(
self._create_losses(
self.policy.log_probs,
self.old_log_probs,
self.value_heads,

keepdims=True,
)
def create_losses(
def _create_losses(
self, probs, old_probs, value_heads, entropy, beta, epsilon, lr, max_step
):
"""

4
ml-agents/mlagents/trainers/sac/optimizer.py


self.learning_rate = LearningModel.create_learning_rate(
lr_schedule, lr, self.policy.global_step, int(max_step)
)
self.create_losses(
self._create_losses(
self.policy_network.q1_heads,
self.policy_network.q2_heads,
lr,

self.prev_action = self.policy_network.prev_action
self.next_memory_in = self.target_network.memory_in
def create_losses(
def _create_losses(
self,
q1_streams: Dict[str, tf.Tensor],
q2_streams: Dict[str, tf.Tensor],

正在加载...
取消
保存