10
10
"collapsed_sections" : [
11
11
" Jxv6goXm7oGF"
12
12
],
13
- "toc_visible" : true
13
+ "toc_visible" : true ,
14
+ "include_colab_link" : true
14
15
},
15
16
"kernelspec" : {
16
17
"name" : " python3" ,
17
18
"display_name" : " Python 3"
18
19
}
19
20
},
20
21
"cells" : [
22
+ {
23
+ "cell_type" : " markdown" ,
24
+ "metadata" : {
25
+ "id" : " view-in-github" ,
26
+ "colab_type" : " text"
27
+ },
28
+ "source" : [
29
+ " [View in Colaboratory](https://colab.research.google.com/github/mdanatg/models/blob/master/samples/core/guide/autograph.ipynb)"
30
+ ]
31
+ },
21
32
{
22
33
"metadata" : {
23
34
"id" : " Jxv6goXm7oGF" ,
740
751
" @autograph.convert(recursive=True)\n " ,
741
752
" def train(train_ds, test_ds, hp):\n " ,
742
753
" m = mlp_model((28 * 28,))\n " ,
743
- " opt = tf.train.MomentumOptimizer (hp.learning_rate, 0.9 )\n " ,
754
+ " opt = tf.train.AdamOptimizer (hp.learning_rate)\n " ,
744
755
" \n " ,
745
756
" # We'd like to save our losses to a list. In order for AutoGraph\n " ,
746
757
" # to convert these lists into their graph equivalent,\n " ,
802
813
"source" : [
803
814
" with tf.Graph().as_default() as g:\n " ,
804
815
" hp = tf.contrib.training.HParams(\n " ,
805
- " learning_rate=0.05 ,\n " ,
816
+ " learning_rate=0.005 ,\n " ,
806
817
" max_steps=500,\n " ,
807
818
" )\n " ,
808
819
" train_ds = setup_mnist_data(True, 50)\n " ,
837
848
"outputs" : []
838
849
}
839
850
]
840
- }
851
+ }
0 commit comments