浏览代码

removed stop gradient/add trainable=false

/docs-update
Andrew Cohen 5 年前
当前提交
099685fe
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ml-agents/mlagents/trainers/models.py

4
ml-agents/mlagents/trainers/models.py


:return: A Tensor containing the learning rate.
"""
if schedule == ScheduleType.CONSTANT:
parameter_rate = tf.Variable(parameter)
parameter_rate = tf.Variable(parameter, trainable=False)
elif schedule == ScheduleType.LINEAR:
parameter_rate = tf.train.polynomial_decay(
parameter, global_step, max_step, min_value, power=1.0

return tf.stop_gradient(parameter_rate)
return parameter_rate
@staticmethod
def scaled_init(scale):

正在加载...
取消
保存