[tf]学习率指数衰减

global_step = tf.Variable(0)  
learning_rate = tf.train.exponential_decay(0.1, global_step, 100, 0.96, staircase=True)     #生成学习率  
learning_step = tf.train.GradientDescentOptimizer(learning_rate).minimize(....., global_step=global_step)  #使用指数衰减学习率  
  • staircase = True:表示使用指数衰减是阶梯式的,只在特定的步长进行衰减。
    11452592-a3f1be19c1fd8126.png
    image.png

猜你喜欢

转载自blog.csdn.net/weixin_34202952/article/details/87128134