Skip to content

Commit 71c196c

Browse files
authored
Merge pull request tensorflow#4837 from mdanatg/master
Update the training schedule for better convergence
2 parents 6adf454 + e6f7756 commit 71c196c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/core/guide/autograph.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@
740740
"@autograph.convert(recursive=True)\n",
741741
"def train(train_ds, test_ds, hp):\n",
742742
" m = mlp_model((28 * 28,))\n",
743-
" opt = tf.train.MomentumOptimizer(hp.learning_rate, 0.9)\n",
743+
" opt = tf.train.AdamOptimizer(hp.learning_rate)\n",
744744
" \n",
745745
" # We'd like to save our losses to a list. In order for AutoGraph\n",
746746
" # to convert these lists into their graph equivalent,\n",
@@ -802,7 +802,7 @@
802802
"source": [
803803
"with tf.Graph().as_default() as g:\n",
804804
" hp = tf.contrib.training.HParams(\n",
805-
" learning_rate=0.05,\n",
805+
" learning_rate=0.005,\n",
806806
" max_steps=500,\n",
807807
" )\n",
808808
" train_ds = setup_mnist_data(True, 50)\n",
@@ -837,4 +837,4 @@
837837
"outputs": []
838838
}
839839
]
840-
}
840+
}

0 commit comments

Comments
 (0)