5
具有指数衰减的Adam优化器
在大多数Tensorflow代码中,我已经看到Adam Optimizer的学习率恒定1e-4(即0.0001)。该代码通常如下所示: ...build the model... # Add the optimizer train_op = tf.train.AdamOptimizer(1e-4).minimize(cross_entropy) # Add the ops to initialize variables. These will include # the optimizer slots added by AdamOptimizer(). init_op = tf.initialize_all_variables() # launch the graph in a session sess = tf.Session() # Actually intialize the variables sess.run(init_op) # now …