kerasでcnn

#概要
kerasでcnnやってみた。

#環境
windows 7 sp1 64bit
anaconda3
tensorflow 1.2
keras2.0

#結果

```
Train on 60000 samples, validate on 10000 samples
Epoch 1/1

  128/60000 [..............................] - ETA: 569s - loss: 2.3251 - acc: 0.1016
  256/60000 [..............................] - ETA: 415s - loss: 2.2919 - acc: 0.1250
  384/60000 [..............................] - ETA: 363s - loss: 2.2677 - acc: 0.1589
  512/60000 [..............................] - ETA: 338s - loss: 2.2513 - acc: 0.1875
  640/60000 [..............................] - ETA: 321s - loss: 2.2303 - acc: 0.2109
  768/60000 [..............................] - ETA: 310s - loss: 2.1995 - acc: 0.2435
  896/60000 [..............................] - ETA: 302s - loss: 2.1724 - acc: 0.2679
 1024/60000 [..............................] - ETA: 296s - loss: 2.1390 - acc: 0.2842
 1152/60000 [..............................] - ETA: 291s - loss: 2.1014 - acc: 0.3090
 1280/60000 [..............................] - ETA: 287s - loss: 2.0576 - acc: 0.3281
 1408/60000 [..............................] - ETA: 284s - loss: 2.0276 - acc: 0.3366
 1536/60000 [..............................] - ETA: 281s - loss: 1.9967 - acc: 0.3490
 1664/60000 [..............................] - ETA: 279s - loss: 1.9458 - acc: 0.3732
 1792/60000 [..............................] - ETA: 277s - loss: 1.9028 - acc: 0.3884
 1920/60000 [..............................] - ETA: 275s - loss: 1.8666 - acc: 0.4005
 2048/60000 [>.............................] - ETA: 273s - loss: 1.8278 - acc: 0.4136
 2176/60000 [>.............................] - ETA: 271s - loss: 1.7923 - acc: 0.4251
 2304/60000 [>.............................] - ETA: 269s - loss: 1.7572 - acc: 0.4375
 2432/60000 [>.............................] - ETA: 268s - loss: 1.7276 - acc: 0.4461
 2560/60000 [>.............................] - ETA: 267s - loss: 1.6965 - acc: 0.4566
 2688/60000 [>.............................] - ETA: 265s - loss: 1.6657 - acc: 0.4665
 2816/60000 [>.............................] - ETA: 264s - loss: 1.6376 - acc: 0.4741
 2944/60000 [>.............................] - ETA: 263s - loss: 1.6017 - acc: 0.4861
 3072/60000 [>.............................] - ETA: 262s - loss: 1.5746 - acc: 0.4941
 3200/60000 [>.............................] - ETA: 261s - loss: 1.5548 - acc: 0.5009
 3328/60000 [>.............................] - ETA: 260s - loss: 1.5458 - acc: 0.5030
 3456/60000 [>.............................] - ETA: 259s - loss: 1.5235 - acc: 0.5110
 3584/60000 [>.............................] - ETA: 258s - loss: 1.4923 - acc: 0.5220
 3712/60000 [>.............................] - ETA: 257s - loss: 1.4641 - acc: 0.5302
 3840/60000 [>.............................] - ETA: 256s - loss: 1.4453 - acc: 0.5346
 3968/60000 [>.............................] - ETA: 255s - loss: 1.4380 - acc: 0.5363
 4096/60000 [=>............................] - ETA: 254s - loss: 1.4272 - acc: 0.5388
 4224/60000 [=>............................] - ETA: 253s - loss: 1.4091 - acc: 0.5445
 4352/60000 [=>............................] - ETA: 252s - loss: 1.3885 - acc: 0.5512
 4480/60000 [=>............................] - ETA: 252s - loss: 1.3705 - acc: 0.5578
 4608/60000 [=>............................] - ETA: 251s - loss: 1.3534 - acc: 0.5629
 4736/60000 [=>............................] - ETA: 250s - loss: 1.3381 - acc: 0.5678
 4864/60000 [=>............................] - ETA: 249s - loss: 1.3236 - acc: 0.5740
 4992/60000 [=>............................] - ETA: 248s - loss: 1.3088 - acc: 0.5789
 5120/60000 [=>............................] - ETA: 248s - loss: 1.2972 - acc: 0.5824
 5248/60000 [=>............................] - ETA: 247s - loss: 1.2825 - acc: 0.5878
 5376/60000 [=>............................] - ETA: 246s - loss: 1.2678 - acc: 0.5924
 5504/60000 [=>............................] - ETA: 246s - loss: 1.2537 - acc: 0.5972
 5632/60000 [=>............................] - ETA: 245s - loss: 1.2363 - acc: 0.6035
 5760/60000 [=>............................] - ETA: 245s - loss: 1.2214 - acc: 0.6083
 5888/60000 [=>............................] - ETA: 244s - loss: 1.2098 - acc: 0.6123
 6016/60000 [==>...........................] - ETA: 243s - loss: 1.1992 - acc: 0.6164
 6144/60000 [==>...........................] - ETA: 242s - loss: 1.1869 - acc: 0.6203
 6272/60000 [==>...........................] - ETA: 242s - loss: 1.1767 - acc: 0.6244
 6400/60000 [==>...........................] - ETA: 241s - loss: 1.1638 - acc: 0.6280
 6528/60000 [==>...........................] - ETA: 241s - loss: 1.1515 - acc: 0.6320
 6656/60000 [==>...........................] - ETA: 241s - loss: 1.1445 - acc: 0.6340
 6784/60000 [==>...........................] - ETA: 240s - loss: 1.1348 - acc: 0.6375
 6912/60000 [==>...........................] - ETA: 239s - loss: 1.1268 - acc: 0.6408
 7040/60000 [==>...........................] - ETA: 239s - loss: 1.1152 - acc: 0.6450
 7168/60000 [==>...........................] - ETA: 238s - loss: 1.1048 - acc: 0.6480
 7296/60000 [==>...........................] - ETA: 238s - loss: 1.0955 - acc: 0.6504
 7424/60000 [==>...........................] - ETA: 237s - loss: 1.0853 - acc: 0.6536
 7552/60000 [==>...........................] - ETA: 237s - loss: 1.0748 - acc: 0.6565
 7680/60000 [==>...........................] - ETA: 239s - loss: 1.0655 - acc: 0.6596
 7808/60000 [==>...........................] - ETA: 241s - loss: 1.0565 - acc: 0.6625
 7936/60000 [==>...........................] - ETA: 243s - loss: 1.0482 - acc: 0.6649
 8064/60000 [===>..........................] - ETA: 243s - loss: 1.0396 - acc: 0.6678
 8192/60000 [===>..........................] - ETA: 244s - loss: 1.0296 - acc: 0.6707
 8320/60000 [===>..........................] - ETA: 243s - loss: 1.0224 - acc: 0.6736
 8448/60000 [===>..........................] - ETA: 243s - loss: 1.0157 - acc: 0.6763
 8576/60000 [===>..........................] - ETA: 242s - loss: 1.0116 - acc: 0.6776
 8704/60000 [===>..........................] - ETA: 242s - loss: 1.0038 - acc: 0.6803
 8832/60000 [===>..........................] - ETA: 241s - loss: 0.9965 - acc: 0.6825
 8960/60000 [===>..........................] - ETA: 240s - loss: 0.9924 - acc: 0.6837
 9088/60000 [===>..........................] - ETA: 240s - loss: 0.9860 - acc: 0.6860
 9216/60000 [===>..........................] - ETA: 239s - loss: 0.9806 - acc: 0.6877
 9344/60000 [===>..........................] - ETA: 239s - loss: 0.9762 - acc: 0.6893
 9472/60000 [===>..........................] - ETA: 239s - loss: 0.9698 - acc: 0.6909
 9600/60000 [===>..........................] - ETA: 239s - loss: 0.9652 - acc: 0.6920
 9728/60000 [===>..........................] - ETA: 239s - loss: 0.9581 - acc: 0.6941
 9856/60000 [===>..........................] - ETA: 239s - loss: 0.9540 - acc: 0.6955
 9984/60000 [===>..........................] - ETA: 238s - loss: 0.9468 - acc: 0.6982
10112/60000 [====>.........................] - ETA: 238s - loss: 0.9400 - acc: 0.7005
10240/60000 [====>.........................] - ETA: 238s - loss: 0.9332 - acc: 0.7024
10368/60000 [====>.........................] - ETA: 237s - loss: 0.9277 - acc: 0.7045
10496/60000 [====>.........................] - ETA: 236s - loss: 0.9225 - acc: 0.7058
10624/60000 [====>.........................] - ETA: 235s - loss: 0.9173 - acc: 0.7079
10752/60000 [====>.........................] - ETA: 234s - loss: 0.9109 - acc: 0.7099
10880/60000 [====>.........................] - ETA: 234s - loss: 0.9042 - acc: 0.7121
11008/60000 [====>.........................] - ETA: 233s - loss: 0.8993 - acc: 0.7138
11136/60000 [====>.........................] - ETA: 232s - loss: 0.8936 - acc: 0.7154
11264/60000 [====>.........................] - ETA: 231s - loss: 0.8885 - acc: 0.7172
11392/60000 [====>.........................] - ETA: 231s - loss: 0.8843 - acc: 0.7185
11520/60000 [====>.........................] - ETA: 230s - loss: 0.8801 - acc: 0.7195
11648/60000 [====>.........................] - ETA: 229s - loss: 0.8759 - acc: 0.7210
11776/60000 [====>.........................] - ETA: 228s - loss: 0.8718 - acc: 0.7225
11904/60000 [====>.........................] - ETA: 228s - loss: 0.8677 - acc: 0.7237
12032/60000 [=====>........................] - ETA: 227s - loss: 0.8619 - acc: 0.7256
12160/60000 [=====>........................] - ETA: 226s - loss: 0.8566 - acc: 0.7273
12288/60000 [=====>........................] - ETA: 226s - loss: 0.8534 - acc: 0.7284
12416/60000 [=====>........................] - ETA: 225s - loss: 0.8482 - acc: 0.7300
12544/60000 [=====>........................] - ETA: 224s - loss: 0.8433 - acc: 0.7317
12672/60000 [=====>........................] - ETA: 223s - loss: 0.8387 - acc: 0.7330
12800/60000 [=====>........................] - ETA: 223s - loss: 0.8355 - acc: 0.7338
12928/60000 [=====>........................] - ETA: 222s - loss: 0.8303 - acc: 0.7355
13056/60000 [=====>........................] - ETA: 221s - loss: 0.8257 - acc: 0.7367
13184/60000 [=====>........................] - ETA: 221s - loss: 0.8218 - acc: 0.7381
13312/60000 [=====>........................] - ETA: 221s - loss: 0.8173 - acc: 0.7396
13440/60000 [=====>........................] - ETA: 220s - loss: 0.8141 - acc: 0.7404
13568/60000 [=====>........................] - ETA: 220s - loss: 0.8106 - acc: 0.7417
13696/60000 [=====>........................] - ETA: 220s - loss: 0.8089 - acc: 0.7423
13824/60000 [=====>........................] - ETA: 219s - loss: 0.8047 - acc: 0.7438
13952/60000 [=====>........................] - ETA: 219s - loss: 0.8001 - acc: 0.7454
14080/60000 [======>.......................] - ETA: 219s - loss: 0.7973 - acc: 0.7468
14208/60000 [======>.......................] - ETA: 219s - loss: 0.7944 - acc: 0.7476
14336/60000 [======>.......................] - ETA: 218s - loss: 0.7904 - acc: 0.7491
14464/60000 [======>.......................] - ETA: 218s - loss: 0.7875 - acc: 0.7501
14592/60000 [======>.......................] - ETA: 218s - loss: 0.7844 - acc: 0.7511
14720/60000 [======>.......................] - ETA: 218s - loss: 0.7812 - acc: 0.7520
14848/60000 [======>.......................] - ETA: 218s - loss: 0.7771 - acc: 0.7533
14976/60000 [======>.......................] - ETA: 218s - loss: 0.7754 - acc: 0.7540
15104/60000 [======>.......................] - ETA: 217s - loss: 0.7720 - acc: 0.7553
15232/60000 [======>.......................] - ETA: 217s - loss: 0.7681 - acc: 0.7566
15360/60000 [======>.......................] - ETA: 216s - loss: 0.7643 - acc: 0.7574
15488/60000 [======>.......................] - ETA: 215s - loss: 0.7613 - acc: 0.7581
15616/60000 [======>.......................] - ETA: 214s - loss: 0.7596 - acc: 0.7589
15744/60000 [======>.......................] - ETA: 214s - loss: 0.7562 - acc: 0.7600
15872/60000 [======>.......................] - ETA: 213s - loss: 0.7527 - acc: 0.7612
16000/60000 [=======>......................] - ETA: 212s - loss: 0.7495 - acc: 0.7622
16128/60000 [=======>......................] - ETA: 212s - loss: 0.7469 - acc: 0.7631
16256/60000 [=======>......................] - ETA: 211s - loss: 0.7440 - acc: 0.7641
16384/60000 [=======>......................] - ETA: 210s - loss: 0.7414 - acc: 0.7650
16512/60000 [=======>......................] - ETA: 210s - loss: 0.7380 - acc: 0.7662
16640/60000 [=======>......................] - ETA: 209s - loss: 0.7349 - acc: 0.7672
16768/60000 [=======>......................] - ETA: 208s - loss: 0.7318 - acc: 0.7681
16896/60000 [=======>......................] - ETA: 208s - loss: 0.7283 - acc: 0.7694
17024/60000 [=======>......................] - ETA: 208s - loss: 0.7255 - acc: 0.7701
17152/60000 [=======>......................] - ETA: 207s - loss: 0.7227 - acc: 0.7712
17280/60000 [=======>......................] - ETA: 207s - loss: 0.7209 - acc: 0.7718
17408/60000 [=======>......................] - ETA: 206s - loss: 0.7180 - acc: 0.7729
17536/60000 [=======>......................] - ETA: 206s - loss: 0.7158 - acc: 0.7738
17664/60000 [=======>......................] - ETA: 205s - loss: 0.7134 - acc: 0.7746
17792/60000 [=======>......................] - ETA: 204s - loss: 0.7099 - acc: 0.7757
17920/60000 [=======>......................] - ETA: 203s - loss: 0.7072 - acc: 0.7766
18048/60000 [========>.....................] - ETA: 203s - loss: 0.7052 - acc: 0.7773
18176/60000 [========>.....................] - ETA: 202s - loss: 0.7034 - acc: 0.7779
18304/60000 [========>.....................] - ETA: 201s - loss: 0.7004 - acc: 0.7787
18432/60000 [========>.....................] - ETA: 201s - loss: 0.6978 - acc: 0.7798
18560/60000 [========>.....................] - ETA: 200s - loss: 0.6957 - acc: 0.7804
18688/60000 [========>.....................] - ETA: 199s - loss: 0.6929 - acc: 0.7814
18816/60000 [========>.....................] - ETA: 199s - loss: 0.6902 - acc: 0.7820
18944/60000 [========>.....................] - ETA: 198s - loss: 0.6878 - acc: 0.7827
19072/60000 [========>.....................] - ETA: 197s - loss: 0.6854 - acc: 0.7835
19200/60000 [========>.....................] - ETA: 197s - loss: 0.6830 - acc: 0.7842
19328/60000 [========>.....................] - ETA: 196s - loss: 0.6800 - acc: 0.7851
19456/60000 [========>.....................] - ETA: 195s - loss: 0.6777 - acc: 0.7859
19584/60000 [========>.....................] - ETA: 195s - loss: 0.6747 - acc: 0.7869
19712/60000 [========>.....................] - ETA: 194s - loss: 0.6726 - acc: 0.7876
19840/60000 [========>.....................] - ETA: 193s - loss: 0.6701 - acc: 0.7885
19968/60000 [========>.....................] - ETA: 193s - loss: 0.6677 - acc: 0.7894
20096/60000 [=========>....................] - ETA: 192s - loss: 0.6659 - acc: 0.7901
20224/60000 [=========>....................] - ETA: 191s - loss: 0.6641 - acc: 0.7908
20352/60000 [=========>....................] - ETA: 191s - loss: 0.6619 - acc: 0.7916
20480/60000 [=========>....................] - ETA: 190s - loss: 0.6597 - acc: 0.7924
20608/60000 [=========>....................] - ETA: 189s - loss: 0.6580 - acc: 0.7929
20736/60000 [=========>....................] - ETA: 189s - loss: 0.6556 - acc: 0.7937
20864/60000 [=========>....................] - ETA: 188s - loss: 0.6539 - acc: 0.7943
20992/60000 [=========>....................] - ETA: 187s - loss: 0.6519 - acc: 0.7949
21120/60000 [=========>....................] - ETA: 187s - loss: 0.6494 - acc: 0.7957
21248/60000 [=========>....................] - ETA: 186s - loss: 0.6471 - acc: 0.7965
21376/60000 [=========>....................] - ETA: 185s - loss: 0.6453 - acc: 0.7971
21504/60000 [=========>....................] - ETA: 185s - loss: 0.6438 - acc: 0.7976
21632/60000 [=========>....................] - ETA: 184s - loss: 0.6419 - acc: 0.7983
21760/60000 [=========>....................] - ETA: 183s - loss: 0.6395 - acc: 0.7991
21888/60000 [=========>....................] - ETA: 183s - loss: 0.6379 - acc: 0.7997
22016/60000 [==========>...................] - ETA: 182s - loss: 0.6362 - acc: 0.8002
22144/60000 [==========>...................] - ETA: 181s - loss: 0.6344 - acc: 0.8008
22272/60000 [==========>...................] - ETA: 181s - loss: 0.6332 - acc: 0.8011
22400/60000 [==========>...................] - ETA: 180s - loss: 0.6307 - acc: 0.8020
22528/60000 [==========>...................] - ETA: 179s - loss: 0.6294 - acc: 0.8023
22656/60000 [==========>...................] - ETA: 179s - loss: 0.6275 - acc: 0.8029
22784/60000 [==========>...................] - ETA: 178s - loss: 0.6257 - acc: 0.8035
22912/60000 [==========>...................] - ETA: 177s - loss: 0.6235 - acc: 0.8043
23040/60000 [==========>...................] - ETA: 177s - loss: 0.6214 - acc: 0.8049
23168/60000 [==========>...................] - ETA: 176s - loss: 0.6198 - acc: 0.8054
23296/60000 [==========>...................] - ETA: 175s - loss: 0.6177 - acc: 0.8062
23424/60000 [==========>...................] - ETA: 175s - loss: 0.6152 - acc: 0.8070
23552/60000 [==========>...................] - ETA: 174s - loss: 0.6135 - acc: 0.8074
23680/60000 [==========>...................] - ETA: 174s - loss: 0.6123 - acc: 0.8081
23808/60000 [==========>...................] - ETA: 173s - loss: 0.6108 - acc: 0.8087
23936/60000 [==========>...................] - ETA: 172s - loss: 0.6090 - acc: 0.8093
24064/60000 [===========>..................] - ETA: 172s - loss: 0.6080 - acc: 0.8098
24192/60000 [===========>..................] - ETA: 171s - loss: 0.6061 - acc: 0.8105
24320/60000 [===========>..................] - ETA: 170s - loss: 0.6054 - acc: 0.8107
24448/60000 [===========>..................] - ETA: 170s - loss: 0.6038 - acc: 0.8110
24576/60000 [===========>..................] - ETA: 169s - loss: 0.6026 - acc: 0.8115
24704/60000 [===========>..................] - ETA: 168s - loss: 0.6009 - acc: 0.8120
24832/60000 [===========>..................] - ETA: 168s - loss: 0.5990 - acc: 0.8125
24960/60000 [===========>..................] - ETA: 167s - loss: 0.5977 - acc: 0.8129
25088/60000 [===========>..................] - ETA: 166s - loss: 0.5959 - acc: 0.8133
25216/60000 [===========>..................] - ETA: 166s - loss: 0.5940 - acc: 0.8140
25344/60000 [===========>..................] - ETA: 165s - loss: 0.5920 - acc: 0.8146
25472/60000 [===========>..................] - ETA: 164s - loss: 0.5909 - acc: 0.8149
25600/60000 [===========>..................] - ETA: 164s - loss: 0.5892 - acc: 0.8155
25728/60000 [===========>..................] - ETA: 163s - loss: 0.5874 - acc: 0.8161
25856/60000 [===========>..................] - ETA: 162s - loss: 0.5858 - acc: 0.8166
25984/60000 [===========>..................] - ETA: 162s - loss: 0.5850 - acc: 0.8169
26112/60000 [============>.................] - ETA: 161s - loss: 0.5833 - acc: 0.8174
26240/60000 [============>.................] - ETA: 161s - loss: 0.5816 - acc: 0.8180
26368/60000 [============>.................] - ETA: 160s - loss: 0.5807 - acc: 0.8183
26496/60000 [============>.................] - ETA: 159s - loss: 0.5796 - acc: 0.8186
26624/60000 [============>.................] - ETA: 159s - loss: 0.5785 - acc: 0.8189
26752/60000 [============>.................] - ETA: 158s - loss: 0.5773 - acc: 0.8192
26880/60000 [============>.................] - ETA: 157s - loss: 0.5760 - acc: 0.8196
27008/60000 [============>.................] - ETA: 157s - loss: 0.5744 - acc: 0.8202
27136/60000 [============>.................] - ETA: 156s - loss: 0.5729 - acc: 0.8207
27264/60000 [============>.................] - ETA: 155s - loss: 0.5711 - acc: 0.8213
27392/60000 [============>.................] - ETA: 155s - loss: 0.5694 - acc: 0.8220
27520/60000 [============>.................] - ETA: 154s - loss: 0.5680 - acc: 0.8224
27648/60000 [============>.................] - ETA: 154s - loss: 0.5661 - acc: 0.8230
27776/60000 [============>.................] - ETA: 153s - loss: 0.5647 - acc: 0.8235
27904/60000 [============>.................] - ETA: 152s - loss: 0.5630 - acc: 0.8241
28032/60000 [=============>................] - ETA: 152s - loss: 0.5620 - acc: 0.8243
28160/60000 [=============>................] - ETA: 151s - loss: 0.5607 - acc: 0.8249
28288/60000 [=============>................] - ETA: 150s - loss: 0.5596 - acc: 0.8253
28416/60000 [=============>................] - ETA: 150s - loss: 0.5579 - acc: 0.8259
28544/60000 [=============>................] - ETA: 149s - loss: 0.5566 - acc: 0.8263
28672/60000 [=============>................] - ETA: 148s - loss: 0.5554 - acc: 0.8266
28800/60000 [=============>................] - ETA: 148s - loss: 0.5542 - acc: 0.8270
28928/60000 [=============>................] - ETA: 147s - loss: 0.5528 - acc: 0.8274
29056/60000 [=============>................] - ETA: 147s - loss: 0.5513 - acc: 0.8280
29184/60000 [=============>................] - ETA: 146s - loss: 0.5500 - acc: 0.8283
29312/60000 [=============>................] - ETA: 145s - loss: 0.5483 - acc: 0.8289
29440/60000 [=============>................] - ETA: 145s - loss: 0.5472 - acc: 0.8294
29568/60000 [=============>................] - ETA: 144s - loss: 0.5463 - acc: 0.8298
29696/60000 [=============>................] - ETA: 143s - loss: 0.5448 - acc: 0.8303
29824/60000 [=============>................] - ETA: 143s - loss: 0.5434 - acc: 0.8307
29952/60000 [=============>................] - ETA: 142s - loss: 0.5421 - acc: 0.8312
30080/60000 [==============>...............] - ETA: 142s - loss: 0.5411 - acc: 0.8316
30208/60000 [==============>...............] - ETA: 141s - loss: 0.5398 - acc: 0.8319
30336/60000 [==============>...............] - ETA: 140s - loss: 0.5384 - acc: 0.8323
30464/60000 [==============>...............] - ETA: 140s - loss: 0.5374 - acc: 0.8326
30592/60000 [==============>...............] - ETA: 139s - loss: 0.5362 - acc: 0.8331
30720/60000 [==============>...............] - ETA: 138s - loss: 0.5346 - acc: 0.8337
30848/60000 [==============>...............] - ETA: 138s - loss: 0.5333 - acc: 0.8341
30976/60000 [==============>...............] - ETA: 137s - loss: 0.5324 - acc: 0.8344
31104/60000 [==============>...............] - ETA: 136s - loss: 0.5316 - acc: 0.8347
31232/60000 [==============>...............] - ETA: 136s - loss: 0.5307 - acc: 0.8349
31360/60000 [==============>...............] - ETA: 135s - loss: 0.5298 - acc: 0.8352
31488/60000 [==============>...............] - ETA: 135s - loss: 0.5286 - acc: 0.8357
31616/60000 [==============>...............] - ETA: 134s - loss: 0.5272 - acc: 0.8362
31744/60000 [==============>...............] - ETA: 133s - loss: 0.5256 - acc: 0.8368
31872/60000 [==============>...............] - ETA: 133s - loss: 0.5241 - acc: 0.8373
32000/60000 [===============>..............] - ETA: 132s - loss: 0.5228 - acc: 0.8377
32128/60000 [===============>..............] - ETA: 131s - loss: 0.5219 - acc: 0.8380
32256/60000 [===============>..............] - ETA: 131s - loss: 0.5207 - acc: 0.8384
32384/60000 [===============>..............] - ETA: 130s - loss: 0.5196 - acc: 0.8386
32512/60000 [===============>..............] - ETA: 130s - loss: 0.5183 - acc: 0.8390
32640/60000 [===============>..............] - ETA: 129s - loss: 0.5173 - acc: 0.8393
32768/60000 [===============>..............] - ETA: 128s - loss: 0.5165 - acc: 0.8396
32896/60000 [===============>..............] - ETA: 128s - loss: 0.5150 - acc: 0.8401
33024/60000 [===============>..............] - ETA: 127s - loss: 0.5140 - acc: 0.8404
33152/60000 [===============>..............] - ETA: 126s - loss: 0.5127 - acc: 0.8408
33280/60000 [===============>..............] - ETA: 126s - loss: 0.5116 - acc: 0.8412
33408/60000 [===============>..............] - ETA: 125s - loss: 0.5104 - acc: 0.8416
33536/60000 [===============>..............] - ETA: 125s - loss: 0.5090 - acc: 0.8420
33664/60000 [===============>..............] - ETA: 124s - loss: 0.5077 - acc: 0.8424
33792/60000 [===============>..............] - ETA: 123s - loss: 0.5065 - acc: 0.8428
33920/60000 [===============>..............] - ETA: 123s - loss: 0.5058 - acc: 0.8431
34048/60000 [================>.............] - ETA: 122s - loss: 0.5046 - acc: 0.8435
34176/60000 [================>.............] - ETA: 121s - loss: 0.5041 - acc: 0.8436
34304/60000 [================>.............] - ETA: 121s - loss: 0.5031 - acc: 0.8439
34432/60000 [================>.............] - ETA: 120s - loss: 0.5023 - acc: 0.8440
34560/60000 [================>.............] - ETA: 120s - loss: 0.5011 - acc: 0.8443
34688/60000 [================>.............] - ETA: 119s - loss: 0.5004 - acc: 0.8446
34816/60000 [================>.............] - ETA: 118s - loss: 0.4997 - acc: 0.8448
34944/60000 [================>.............] - ETA: 118s - loss: 0.4989 - acc: 0.8451
35072/60000 [================>.............] - ETA: 117s - loss: 0.4979 - acc: 0.8454
35200/60000 [================>.............] - ETA: 116s - loss: 0.4966 - acc: 0.8458
35328/60000 [================>.............] - ETA: 116s - loss: 0.4954 - acc: 0.8461
35456/60000 [================>.............] - ETA: 115s - loss: 0.4945 - acc: 0.8465
35584/60000 [================>.............] - ETA: 115s - loss: 0.4939 - acc: 0.8466
35712/60000 [================>.............] - ETA: 114s - loss: 0.4927 - acc: 0.8469
35840/60000 [================>.............] - ETA: 113s - loss: 0.4918 - acc: 0.8473
35968/60000 [================>.............] - ETA: 113s - loss: 0.4906 - acc: 0.8476
36096/60000 [=================>............] - ETA: 112s - loss: 0.4896 - acc: 0.8479
36224/60000 [=================>............] - ETA: 112s - loss: 0.4886 - acc: 0.8483
36352/60000 [=================>............] - ETA: 111s - loss: 0.4875 - acc: 0.8486
36480/60000 [=================>............] - ETA: 110s - loss: 0.4864 - acc: 0.8490
36608/60000 [=================>............] - ETA: 110s - loss: 0.4855 - acc: 0.8493
36736/60000 [=================>............] - ETA: 109s - loss: 0.4844 - acc: 0.8497
36864/60000 [=================>............] - ETA: 108s - loss: 0.4835 - acc: 0.8500
36992/60000 [=================>............] - ETA: 108s - loss: 0.4828 - acc: 0.8502
37120/60000 [=================>............] - ETA: 107s - loss: 0.4816 - acc: 0.8506
37248/60000 [=================>............] - ETA: 107s - loss: 0.4809 - acc: 0.8508
37376/60000 [=================>............] - ETA: 106s - loss: 0.4800 - acc: 0.8511
37504/60000 [=================>............] - ETA: 105s - loss: 0.4795 - acc: 0.8514
37632/60000 [=================>............] - ETA: 105s - loss: 0.4787 - acc: 0.8516
37760/60000 [=================>............] - ETA: 104s - loss: 0.4779 - acc: 0.8518
37888/60000 [=================>............] - ETA: 103s - loss: 0.4771 - acc: 0.8521
38016/60000 [==================>...........] - ETA: 103s - loss: 0.4762 - acc: 0.8523
38144/60000 [==================>...........] - ETA: 102s - loss: 0.4756 - acc: 0.8527
38272/60000 [==================>...........] - ETA: 102s - loss: 0.4748 - acc: 0.8531
38400/60000 [==================>...........] - ETA: 101s - loss: 0.4743 - acc: 0.8532
38528/60000 [==================>...........] - ETA: 100s - loss: 0.4735 - acc: 0.8533
38656/60000 [==================>...........] - ETA: 100s - loss: 0.4730 - acc: 0.8535
38784/60000 [==================>...........] - ETA: 99s - loss: 0.4721 - acc: 0.8538 
38912/60000 [==================>...........] - ETA: 99s - loss: 0.4711 - acc: 0.8541
39040/60000 [==================>...........] - ETA: 98s - loss: 0.4702 - acc: 0.8545
39168/60000 [==================>...........] - ETA: 97s - loss: 0.4696 - acc: 0.8546
39296/60000 [==================>...........] - ETA: 97s - loss: 0.4689 - acc: 0.8548
39424/60000 [==================>...........] - ETA: 96s - loss: 0.4678 - acc: 0.8552
39552/60000 [==================>...........] - ETA: 95s - loss: 0.4671 - acc: 0.8554
39680/60000 [==================>...........] - ETA: 95s - loss: 0.4662 - acc: 0.8557
39808/60000 [==================>...........] - ETA: 94s - loss: 0.4656 - acc: 0.8559
39936/60000 [==================>...........] - ETA: 94s - loss: 0.4648 - acc: 0.8561
40064/60000 [===================>..........] - ETA: 93s - loss: 0.4640 - acc: 0.8563
40192/60000 [===================>..........] - ETA: 92s - loss: 0.4631 - acc: 0.8567
40320/60000 [===================>..........] - ETA: 92s - loss: 0.4625 - acc: 0.8568
40448/60000 [===================>..........] - ETA: 91s - loss: 0.4622 - acc: 0.8570
40576/60000 [===================>..........] - ETA: 91s - loss: 0.4611 - acc: 0.8573
40704/60000 [===================>..........] - ETA: 90s - loss: 0.4601 - acc: 0.8576
40832/60000 [===================>..........] - ETA: 89s - loss: 0.4591 - acc: 0.8580
40960/60000 [===================>..........] - ETA: 89s - loss: 0.4584 - acc: 0.8582
41088/60000 [===================>..........] - ETA: 88s - loss: 0.4574 - acc: 0.8585
41216/60000 [===================>..........] - ETA: 88s - loss: 0.4569 - acc: 0.8587
41344/60000 [===================>..........] - ETA: 87s - loss: 0.4560 - acc: 0.8590
41472/60000 [===================>..........] - ETA: 86s - loss: 0.4552 - acc: 0.8593
41600/60000 [===================>..........] - ETA: 86s - loss: 0.4546 - acc: 0.8594
41728/60000 [===================>..........] - ETA: 85s - loss: 0.4540 - acc: 0.8596
41856/60000 [===================>..........] - ETA: 84s - loss: 0.4535 - acc: 0.8598
41984/60000 [===================>..........] - ETA: 84s - loss: 0.4526 - acc: 0.8600
42112/60000 [====================>.........] - ETA: 83s - loss: 0.4516 - acc: 0.8603
42240/60000 [====================>.........] - ETA: 83s - loss: 0.4508 - acc: 0.8606
42368/60000 [====================>.........] - ETA: 82s - loss: 0.4500 - acc: 0.8609
42496/60000 [====================>.........] - ETA: 81s - loss: 0.4492 - acc: 0.8611
42624/60000 [====================>.........] - ETA: 81s - loss: 0.4484 - acc: 0.8613
42752/60000 [====================>.........] - ETA: 80s - loss: 0.4475 - acc: 0.8617
42880/60000 [====================>.........] - ETA: 80s - loss: 0.4469 - acc: 0.8618
43008/60000 [====================>.........] - ETA: 79s - loss: 0.4462 - acc: 0.8620
43136/60000 [====================>.........] - ETA: 78s - loss: 0.4459 - acc: 0.8621
43264/60000 [====================>.........] - ETA: 78s - loss: 0.4454 - acc: 0.8623
43392/60000 [====================>.........] - ETA: 77s - loss: 0.4447 - acc: 0.8625
43520/60000 [====================>.........] - ETA: 77s - loss: 0.4439 - acc: 0.8628
43648/60000 [====================>.........] - ETA: 76s - loss: 0.4431 - acc: 0.8630
43776/60000 [====================>.........] - ETA: 75s - loss: 0.4425 - acc: 0.8632
43904/60000 [====================>.........] - ETA: 75s - loss: 0.4419 - acc: 0.8633
44032/60000 [=====================>........] - ETA: 74s - loss: 0.4415 - acc: 0.8634
44160/60000 [=====================>........] - ETA: 74s - loss: 0.4409 - acc: 0.8636
44288/60000 [=====================>........] - ETA: 73s - loss: 0.4401 - acc: 0.8638
44416/60000 [=====================>........] - ETA: 72s - loss: 0.4393 - acc: 0.8641
44544/60000 [=====================>........] - ETA: 72s - loss: 0.4387 - acc: 0.8642
44672/60000 [=====================>........] - ETA: 71s - loss: 0.4379 - acc: 0.8644
44800/60000 [=====================>........] - ETA: 71s - loss: 0.4373 - acc: 0.8646
44928/60000 [=====================>........] - ETA: 70s - loss: 0.4366 - acc: 0.8649
45056/60000 [=====================>........] - ETA: 69s - loss: 0.4358 - acc: 0.8651
45184/60000 [=====================>........] - ETA: 69s - loss: 0.4349 - acc: 0.8653
45312/60000 [=====================>........] - ETA: 68s - loss: 0.4341 - acc: 0.8656
45440/60000 [=====================>........] - ETA: 68s - loss: 0.4338 - acc: 0.8657
45568/60000 [=====================>........] - ETA: 67s - loss: 0.4330 - acc: 0.8660
45696/60000 [=====================>........] - ETA: 66s - loss: 0.4325 - acc: 0.8661
45824/60000 [=====================>........] - ETA: 66s - loss: 0.4317 - acc: 0.8664
45952/60000 [=====================>........] - ETA: 65s - loss: 0.4311 - acc: 0.8666
46080/60000 [======================>.......] - ETA: 65s - loss: 0.4306 - acc: 0.8667
46208/60000 [======================>.......] - ETA: 64s - loss: 0.4300 - acc: 0.8669
46336/60000 [======================>.......] - ETA: 63s - loss: 0.4292 - acc: 0.8671
46464/60000 [======================>.......] - ETA: 63s - loss: 0.4286 - acc: 0.8673
46592/60000 [======================>.......] - ETA: 62s - loss: 0.4277 - acc: 0.8676
46720/60000 [======================>.......] - ETA: 62s - loss: 0.4271 - acc: 0.8679
46848/60000 [======================>.......] - ETA: 61s - loss: 0.4263 - acc: 0.8681
46976/60000 [======================>.......] - ETA: 60s - loss: 0.4254 - acc: 0.8683
47104/60000 [======================>.......] - ETA: 60s - loss: 0.4245 - acc: 0.8686
47232/60000 [======================>.......] - ETA: 59s - loss: 0.4246 - acc: 0.8687
47360/60000 [======================>.......] - ETA: 59s - loss: 0.4239 - acc: 0.8689
47488/60000 [======================>.......] - ETA: 58s - loss: 0.4232 - acc: 0.8692
47616/60000 [======================>.......] - ETA: 57s - loss: 0.4225 - acc: 0.8694
47744/60000 [======================>.......] - ETA: 57s - loss: 0.4220 - acc: 0.8697
47872/60000 [======================>.......] - ETA: 56s - loss: 0.4215 - acc: 0.8698
48000/60000 [=======================>......] - ETA: 56s - loss: 0.4212 - acc: 0.8700
48128/60000 [=======================>......] - ETA: 55s - loss: 0.4206 - acc: 0.8702
48256/60000 [=======================>......] - ETA: 54s - loss: 0.4201 - acc: 0.8703
48384/60000 [=======================>......] - ETA: 54s - loss: 0.4194 - acc: 0.8706
48512/60000 [=======================>......] - ETA: 53s - loss: 0.4186 - acc: 0.8708
48640/60000 [=======================>......] - ETA: 53s - loss: 0.4182 - acc: 0.8709
48768/60000 [=======================>......] - ETA: 52s - loss: 0.4173 - acc: 0.8712
48896/60000 [=======================>......] - ETA: 51s - loss: 0.4166 - acc: 0.8716
49024/60000 [=======================>......] - ETA: 51s - loss: 0.4163 - acc: 0.8718
49152/60000 [=======================>......] - ETA: 50s - loss: 0.4157 - acc: 0.8719
49280/60000 [=======================>......] - ETA: 50s - loss: 0.4150 - acc: 0.8722
49408/60000 [=======================>......] - ETA: 49s - loss: 0.4144 - acc: 0.8724
49536/60000 [=======================>......] - ETA: 48s - loss: 0.4137 - acc: 0.8726
49664/60000 [=======================>......] - ETA: 48s - loss: 0.4129 - acc: 0.8728
49792/60000 [=======================>......] - ETA: 47s - loss: 0.4120 - acc: 0.8731
49920/60000 [=======================>......] - ETA: 47s - loss: 0.4115 - acc: 0.8733
50048/60000 [========================>.....] - ETA: 46s - loss: 0.4109 - acc: 0.8734
50176/60000 [========================>.....] - ETA: 45s - loss: 0.4104 - acc: 0.8736
50304/60000 [========================>.....] - ETA: 45s - loss: 0.4098 - acc: 0.8737
50432/60000 [========================>.....] - ETA: 44s - loss: 0.4094 - acc: 0.8739
50560/60000 [========================>.....] - ETA: 44s - loss: 0.4089 - acc: 0.8740
50688/60000 [========================>.....] - ETA: 43s - loss: 0.4083 - acc: 0.8742
50816/60000 [========================>.....] - ETA: 42s - loss: 0.4078 - acc: 0.8744
50944/60000 [========================>.....] - ETA: 42s - loss: 0.4070 - acc: 0.8746
51072/60000 [========================>.....] - ETA: 41s - loss: 0.4063 - acc: 0.8749
51200/60000 [========================>.....] - ETA: 41s - loss: 0.4056 - acc: 0.8750
51328/60000 [========================>.....] - ETA: 40s - loss: 0.4050 - acc: 0.8752
51456/60000 [========================>.....] - ETA: 39s - loss: 0.4043 - acc: 0.8754
51584/60000 [========================>.....] - ETA: 39s - loss: 0.4035 - acc: 0.8756
51712/60000 [========================>.....] - ETA: 38s - loss: 0.4029 - acc: 0.8759
51840/60000 [========================>.....] - ETA: 38s - loss: 0.4025 - acc: 0.8760
51968/60000 [========================>.....] - ETA: 37s - loss: 0.4021 - acc: 0.8762
52096/60000 [=========================>....] - ETA: 36s - loss: 0.4016 - acc: 0.8763
52224/60000 [=========================>....] - ETA: 36s - loss: 0.4013 - acc: 0.8765
52352/60000 [=========================>....] - ETA: 35s - loss: 0.4009 - acc: 0.8766
52480/60000 [=========================>....] - ETA: 35s - loss: 0.4002 - acc: 0.8768
52608/60000 [=========================>....] - ETA: 34s - loss: 0.3997 - acc: 0.8770
52736/60000 [=========================>....] - ETA: 33s - loss: 0.3992 - acc: 0.8771
52864/60000 [=========================>....] - ETA: 33s - loss: 0.3987 - acc: 0.8773
52992/60000 [=========================>....] - ETA: 32s - loss: 0.3981 - acc: 0.8775
53120/60000 [=========================>....] - ETA: 32s - loss: 0.3976 - acc: 0.8776
53248/60000 [=========================>....] - ETA: 31s - loss: 0.3969 - acc: 0.8778
53376/60000 [=========================>....] - ETA: 30s - loss: 0.3963 - acc: 0.8780
53504/60000 [=========================>....] - ETA: 30s - loss: 0.3957 - acc: 0.8783
53632/60000 [=========================>....] - ETA: 29s - loss: 0.3951 - acc: 0.8784
53760/60000 [=========================>....] - ETA: 29s - loss: 0.3946 - acc: 0.8786
53888/60000 [=========================>....] - ETA: 28s - loss: 0.3940 - acc: 0.8788
54016/60000 [==========================>...] - ETA: 27s - loss: 0.3934 - acc: 0.8790
54144/60000 [==========================>...] - ETA: 27s - loss: 0.3928 - acc: 0.8791
54272/60000 [==========================>...] - ETA: 26s - loss: 0.3922 - acc: 0.8793
54400/60000 [==========================>...] - ETA: 26s - loss: 0.3918 - acc: 0.8795
54528/60000 [==========================>...] - ETA: 25s - loss: 0.3913 - acc: 0.8797
54656/60000 [==========================>...] - ETA: 24s - loss: 0.3910 - acc: 0.8798
54784/60000 [==========================>...] - ETA: 24s - loss: 0.3904 - acc: 0.8799
54912/60000 [==========================>...] - ETA: 23s - loss: 0.3899 - acc: 0.8800
55040/60000 [==========================>...] - ETA: 23s - loss: 0.3896 - acc: 0.8801
55168/60000 [==========================>...] - ETA: 22s - loss: 0.3889 - acc: 0.8804
55296/60000 [==========================>...] - ETA: 21s - loss: 0.3884 - acc: 0.8806
55424/60000 [==========================>...] - ETA: 21s - loss: 0.3879 - acc: 0.8807
55552/60000 [==========================>...] - ETA: 20s - loss: 0.3872 - acc: 0.8810
55680/60000 [==========================>...] - ETA: 20s - loss: 0.3865 - acc: 0.8812
55808/60000 [==========================>...] - ETA: 19s - loss: 0.3861 - acc: 0.8813
55936/60000 [==========================>...] - ETA: 18s - loss: 0.3857 - acc: 0.8814
56064/60000 [===========================>..] - ETA: 18s - loss: 0.3854 - acc: 0.8815
56192/60000 [===========================>..] - ETA: 17s - loss: 0.3851 - acc: 0.8816
56320/60000 [===========================>..] - ETA: 17s - loss: 0.3845 - acc: 0.8817
56448/60000 [===========================>..] - ETA: 16s - loss: 0.3840 - acc: 0.8820
56576/60000 [===========================>..] - ETA: 15s - loss: 0.3836 - acc: 0.8821
56704/60000 [===========================>..] - ETA: 15s - loss: 0.3831 - acc: 0.8823
56832/60000 [===========================>..] - ETA: 14s - loss: 0.3828 - acc: 0.8823
56960/60000 [===========================>..] - ETA: 14s - loss: 0.3825 - acc: 0.8824
57088/60000 [===========================>..] - ETA: 13s - loss: 0.3820 - acc: 0.8826
57216/60000 [===========================>..] - ETA: 12s - loss: 0.3816 - acc: 0.8827
57344/60000 [===========================>..] - ETA: 12s - loss: 0.3810 - acc: 0.8829
57472/60000 [===========================>..] - ETA: 11s - loss: 0.3808 - acc: 0.8831
57600/60000 [===========================>..] - ETA: 11s - loss: 0.3803 - acc: 0.8832
57728/60000 [===========================>..] - ETA: 10s - loss: 0.3798 - acc: 0.8834
57856/60000 [===========================>..] - ETA: 9s - loss: 0.3794 - acc: 0.8835 
57984/60000 [===========================>..] - ETA: 9s - loss: 0.3789 - acc: 0.8836
58112/60000 [============================>.] - ETA: 8s - loss: 0.3785 - acc: 0.8838
58240/60000 [============================>.] - ETA: 8s - loss: 0.3780 - acc: 0.8839
58368/60000 [============================>.] - ETA: 7s - loss: 0.3776 - acc: 0.8840
58496/60000 [============================>.] - ETA: 6s - loss: 0.3770 - acc: 0.8842
58624/60000 [============================>.] - ETA: 6s - loss: 0.3768 - acc: 0.8843
58752/60000 [============================>.] - ETA: 5s - loss: 0.3764 - acc: 0.8844
58880/60000 [============================>.] - ETA: 5s - loss: 0.3760 - acc: 0.8845
59008/60000 [============================>.] - ETA: 4s - loss: 0.3757 - acc: 0.8846
59136/60000 [============================>.] - ETA: 4s - loss: 0.3752 - acc: 0.8848
59264/60000 [============================>.] - ETA: 3s - loss: 0.3747 - acc: 0.8849
59392/60000 [============================>.] - ETA: 2s - loss: 0.3744 - acc: 0.8850
59520/60000 [============================>.] - ETA: 2s - loss: 0.3739 - acc: 0.8851
59648/60000 [============================>.] - ETA: 1s - loss: 0.3734 - acc: 0.8853
59776/60000 [============================>.] - ETA: 1s - loss: 0.3727 - acc: 0.8855
59904/60000 [============================>.] - ETA: 0s - loss: 0.3723 - acc: 0.8856
60000/60000 [==============================] - 290s - loss: 0.3720 - acc: 0.8857 - val_loss: 0.0914 - val_acc: 0.9709
Test loss: 0.0914223476751
Test accuracy: 0.9709

```

#サンプルコード

```
from tensorflow.contrib.keras.python.keras.datasets import mnist
from tensorflow.contrib.keras.python.keras.utils.np_utils import to_categorical
from tensorflow.contrib.keras.python.keras.models import Sequential
from tensorflow.contrib.keras.python.keras.layers import Dense, Dropout, Flatten
from tensorflow.contrib.keras.python.keras.layers import Conv2D, MaxPooling2D

img_rows, img_cols = 28, 28
input_shape = (img_rows, img_cols, 1)
num_classes = 10
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)
x_test = x_test.reshape(x_test.shape[0], img_rows, img_cols, 1)
x_train = x_train.astype('float32')
x_test = x_test.astype('float32')
x_train /= 255
x_test /= 255
y_train = to_categorical(y_train, num_classes)
y_test = to_categorical(y_test, num_classes)

batch_size = 128
epochs = 1
model = Sequential()
model.add(Conv2D(32, kernel_size = (3, 3), activation = 'relu', input_shape = input_shape))
model.add(Conv2D(64, (3, 3), activation = 'relu'))
model.add(MaxPooling2D(pool_size = (2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(128, activation = 'relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation = 'softmax'))
model.compile(loss = 'categorical_crossentropy', optimizer = 'Adadelta', metrics = ['accuracy'])
model.fit(x_train, y_train, batch_size = batch_size, epochs = epochs, verbose = 1, validation_data = (x_test, y_test))
score = model.evaluate(x_test, y_test, verbose = 0)
print ('Test loss:', score[0])
print ('Test accuracy:', score[1])

```

以上。