From d3a357b85eaa368695472dee9b513b91d3dc23d2 Mon Sep 17 00:00:00 2001 From: ArcPi Date: Sun, 5 Aug 2018 20:48:03 +0800 Subject: [PATCH] Update opt4_8_backward.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这里应该少了个global_step吧,要不指数衰减没法工作吧 --- opt/opt4_8_backward.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opt/opt4_8_backward.py b/opt/opt4_8_backward.py index 16d0a3a..6b7ecd4 100644 --- a/opt/opt4_8_backward.py +++ b/opt/opt4_8_backward.py @@ -35,7 +35,7 @@ def backward(): loss_total = loss_mse + tf.add_n(tf.get_collection('losses')) #定义反向传播方法:包含正则化 - train_step = tf.train.AdamOptimizer(learning_rate).minimize(loss_total) + train_step = tf.train.AdamOptimizer(learning_rate).minimize(loss_total,global_step=global_step) with tf.Session() as sess: init_op = tf.global_variables_initializer()