Keras中利用两层卷积神经网络进行mnist手写识别

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_25964837/article/details/79025822
代码
import numpy as np

np.random.seed(1337)  # for reproducibility
from keras.datasets import mnist
from keras.datasets import cifar10
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.utils import np_utils
from keras import backend as K
import h5py

# 全局变量
batch_size = 256
nb_classes = 10
epochs = 12
# input image dimensions
img_rows, img_cols = 28, 28
# number of convolutional filters to use
nb_filters = 32
# size of pooling area for max pooling
pool_size = (2, 2)
# convolution kernel size
kernel_size = (3, 3)

# the data, shuffled and split between train and test sets
(X_train, y_train), (X_test, y_test) = mnist.load_data()



print(np.shape(X_train),np.shape(y_train))
print(np.shape(X_test),np.shape(y_test))
print(type(X_train))
print(X_train.shape[0])
print(np.shape( X_train.reshape(X_train.shape[0], img_rows, img_cols, 1)))
print('标签:',y_train[0:20])




#根据不同的backend定下不同的格式
if K.image_dim_ordering() == 'th':
    X_train = X_train.reshape(X_train.shape[0], 1, img_rows, img_cols)
    X_test = X_test.reshape(X_test.shape[0], 1, img_rows, img_cols)
    input_shape = (1, img_rows, img_cols)
else:
    X_train = X_train.reshape(X_train.shape[0], img_rows, img_cols, 1)#把第三个通道1补上
    X_test = X_test.reshape(X_test.shape[0], img_rows, img_cols, 1)
    input_shape = (img_rows, img_cols, 1)#元组类型,元素不能更改

X_train = X_train.astype('float32')
X_test = X_test.astype('float32')
X_train /= 255
X_test /= 255
print('X_train shape:', X_train.shape)
print(X_train.shape[0], 'train samples')
print(X_test.shape[0], 'test samples')

# 转换为one_hot类型
Y_train = np_utils.to_categorical(y_train, nb_classes)
Y_test = np_utils.to_categorical(y_test, nb_classes)

print(Y_train.shape,Y_train[0,0:11])
print(Y_test.shape,Y_test[0,0:11])
# 构建模型
model = Sequential()
"""
model.add(Convolution2D(nb_filters, kernel_size[0], kernel_size[1],
                        border_mode='same',
                        input_shape=input_shape))
"""
model.add(Convolution2D(nb_filters, (kernel_size[0], kernel_size[1]),
                        padding='same',
                        input_shape=input_shape))  # 卷积层1
model.add(Activation('relu'))  # 激活层
model.add(MaxPooling2D(pool_size=pool_size))#池化层
model.add(Convolution2D(nb_filters, (kernel_size[0], kernel_size[1])))  # 卷积层2
model.add(Activation('relu'))  # 激活层
model.add(MaxPooling2D(pool_size=pool_size))  # 池化层
model.add(Dropout(0.25))  # 神经元随机失活
model.add(Flatten())  # 拉成一维数据
model.add(Dense(128))  # 全连接层1
model.add(Activation('relu'))  # 激活层
model.add(Dropout(0.5))  # 随机失活
model.add(Dense(nb_classes))  # 全连接层2
model.add(Activation('softmax'))  # 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 score:', score[0])
print('Test accuracy:', score[1])
输出结果:

E:\phthon35\python.exe I:/catsVSdogs1-master/catsVSdogs1-master/file01/SparseAutoEncoded.py
Using TensorFlow backend.
(60000, 28, 28) (60000,)
(10000, 28, 28) (10000,)
<class 'numpy.ndarray'>
60000
(60000, 28, 28, 1)
标签: [5 0 4 1 9 2 1 3 1 4 3 5 3 6 1 7 2 8 6 9]
X_train shape: (60000, 28, 28, 1)
60000 train samples
10000 test samples
(60000, 10) [ 0.  0.  0.  0.  0.  1.  0.  0.  0.  0.]
(10000, 10) [ 0.  0.  0.  0.  0.  0.  0.  1.  0.  0.]
Train on 60000 samples, validate on 10000 samples
Epoch 1/12
2018-01-10 16:53:35.490195: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2018-01-10 16:53:35.815757: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.683
pciBusID: 0000:01:00.0
totalMemory: 11.00GiB freeMemory: 9.10GiB
2018-01-10 16:53:35.816114: I C:\tf_jenkins\home\workspace\rel-win\M\windows-gpu\PY\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)

  256/60000 [..............................] - ETA: 8:51 - loss: 2.3166 - acc: 0.0977
 1536/60000 [..............................] - ETA: 1:29 - loss: 2.2753 - acc: 0.1549
 3072/60000 [>.............................] - ETA: 44s - loss: 2.2067 - acc: 0.2230 
 4096/60000 [=>............................] - ETA: 33s - loss: 2.1455 - acc: 0.2664
 5888/60000 [=>............................] - ETA: 23s - loss: 2.0069 - acc: 0.3263
 7168/60000 [==>...........................] - ETA: 19s - loss: 1.9077 - acc: 0.3634
 8448/60000 [===>..........................] - ETA: 16s - loss: 1.8163 - acc: 0.3965
 9984/60000 [===>..........................] - ETA: 13s - loss: 1.7047 - acc: 0.4343
11776/60000 [====>.........................] - ETA: 11s - loss: 1.5922 - acc: 0.4735
13056/60000 [=====>........................] - ETA: 10s - loss: 1.5168 - acc: 0.4998
14848/60000 [======>.......................] - ETA: 8s - loss: 1.4239 - acc: 0.5304 
16384/60000 [=======>......................] - ETA: 7s - loss: 1.3560 - acc: 0.5533
17664/60000 [=======>......................] - ETA: 7s - loss: 1.3029 - acc: 0.5716
18688/60000 [========>.....................] - ETA: 6s - loss: 1.2655 - acc: 0.5842
20480/60000 [=========>....................] - ETA: 6s - loss: 1.2021 - acc: 0.6057
21504/60000 [=========>....................] - ETA: 5s - loss: 1.1729 - acc: 0.6154
22784/60000 [==========>...................] - ETA: 5s - loss: 1.1378 - acc: 0.6278
24320/60000 [===========>..................] - ETA: 4s - loss: 1.0990 - acc: 0.6418
26112/60000 [============>.................] - ETA: 4s - loss: 1.0561 - acc: 0.6563
27136/60000 [============>.................] - ETA: 4s - loss: 1.0343 - acc: 0.6636
28416/60000 [=============>................] - ETA: 3s - loss: 1.0064 - acc: 0.6728
29696/60000 [=============>................] - ETA: 3s - loss: 0.9824 - acc: 0.6807
30976/60000 [==============>...............] - ETA: 3s - loss: 0.9594 - acc: 0.6887
32000/60000 [===============>..............] - ETA: 3s - loss: 0.9425 - acc: 0.6943
33280/60000 [===============>..............] - ETA: 3s - loss: 0.9207 - acc: 0.7018
35072/60000 [================>.............] - ETA: 2s - loss: 0.8936 - acc: 0.7109
36096/60000 [=================>............] - ETA: 2s - loss: 0.8791 - acc: 0.7159
37376/60000 [=================>............] - ETA: 2s - loss: 0.8618 - acc: 0.7215
38400/60000 [==================>...........] - ETA: 2s - loss: 0.8482 - acc: 0.7261
39936/60000 [==================>...........] - ETA: 2s - loss: 0.8290 - acc: 0.7328
41472/60000 [===================>..........] - ETA: 1s - loss: 0.8105 - acc: 0.7392
42752/60000 [====================>.........] - ETA: 1s - loss: 0.7972 - acc: 0.7435
44544/60000 [=====================>........] - ETA: 1s - loss: 0.7781 - acc: 0.7499
46336/60000 [======================>.......] - ETA: 1s - loss: 0.7608 - acc: 0.7557
48128/60000 [=======================>......] - ETA: 1s - loss: 0.7444 - acc: 0.7611
49664/60000 [=======================>......] - ETA: 0s - loss: 0.7304 - acc: 0.7659
50432/60000 [========================>.....] - ETA: 0s - loss: 0.7239 - acc: 0.7681
51456/60000 [========================>.....] - ETA: 0s - loss: 0.7157 - acc: 0.7710
52736/60000 [=========================>....] - ETA: 0s - loss: 0.7061 - acc: 0.7743
54784/60000 [==========================>...] - ETA: 0s - loss: 0.6909 - acc: 0.7790
56064/60000 [===========================>..] - ETA: 0s - loss: 0.6810 - acc: 0.7822
57600/60000 [===========================>..] - ETA: 0s - loss: 0.6697 - acc: 0.7860
59392/60000 [============================>.] - ETA: 0s - loss: 0.6578 - acc: 0.7901
60000/60000 [==============================] - 5s 88us/step - loss: 0.6537 - acc: 0.7915 - val_loss: 0.1492 - val_acc: 0.9553
Epoch 2/12

  256/60000 [..............................] - ETA: 0s - loss: 0.2639 - acc: 0.9219
 1792/60000 [..............................] - ETA: 2s - loss: 0.2680 - acc: 0.9141
 3072/60000 [>.............................] - ETA: 2s - loss: 0.2682 - acc: 0.9167
 4352/60000 [=>............................] - ETA: 2s - loss: 0.2722 - acc: 0.9173
 5888/60000 [=>............................] - ETA: 2s - loss: 0.2795 - acc: 0.9163
 6912/60000 [==>...........................] - ETA: 2s - loss: 0.2802 - acc: 0.9151
 8448/60000 [===>..........................] - ETA: 2s - loss: 0.2758 - acc: 0.9168
 9728/60000 [===>..........................] - ETA: 2s - loss: 0.2712 - acc: 0.9164
11520/60000 [====>.........................] - ETA: 2s - loss: 0.2669 - acc: 0.9187
12800/60000 [=====>........................] - ETA: 2s - loss: 0.2673 - acc: 0.9187
14336/60000 [======>.......................] - ETA: 2s - loss: 0.2651 - acc: 0.9194
15616/60000 [======>.......................] - ETA: 2s - loss: 0.2638 - acc: 0.9195
16896/60000 [=======>......................] - ETA: 1s - loss: 0.2634 - acc: 0.9194
18176/60000 [========>.....................] - ETA: 1s - loss: 0.2606 - acc: 0.9204
19456/60000 [========>.....................] - ETA: 1s - loss: 0.2589 - acc: 0.9211
20992/60000 [=========>....................] - ETA: 1s - loss: 0.2567 - acc: 0.9223
22784/60000 [==========>...................] - ETA: 1s - loss: 0.2531 - acc: 0.9229
24832/60000 [===========>..................] - ETA: 1s - loss: 0.2519 - acc: 0.9235
25856/60000 [===========>..................] - ETA: 1s - loss: 0.2507 - acc: 0.9238
26880/60000 [============>.................] - ETA: 1s - loss: 0.2514 - acc: 0.9238
28416/60000 [=============>................] - ETA: 1s - loss: 0.2480 - acc: 0.9248
29952/60000 [=============>................] - ETA: 1s - loss: 0.2459 - acc: 0.9257
30976/60000 [==============>...............] - ETA: 1s - loss: 0.2447 - acc: 0.9258
32512/60000 [===============>..............] - ETA: 1s - loss: 0.2430 - acc: 0.9261
34048/60000 [================>.............] - ETA: 1s - loss: 0.2400 - acc: 0.9269
35840/60000 [================>.............] - ETA: 1s - loss: 0.2394 - acc: 0.9273
37376/60000 [=================>............] - ETA: 0s - loss: 0.2374 - acc: 0.9280
38912/60000 [==================>...........] - ETA: 0s - loss: 0.2354 - acc: 0.9287
40448/60000 [===================>..........] - ETA: 0s - loss: 0.2348 - acc: 0.9289
41728/60000 [===================>..........] - ETA: 0s - loss: 0.2337 - acc: 0.9292
43008/60000 [====================>.........] - ETA: 0s - loss: 0.2333 - acc: 0.9293
44544/60000 [=====================>........] - ETA: 0s - loss: 0.2320 - acc: 0.9297
45824/60000 [=====================>........] - ETA: 0s - loss: 0.2317 - acc: 0.9300
47616/60000 [======================>.......] - ETA: 0s - loss: 0.2301 - acc: 0.9305
49152/60000 [=======================>......] - ETA: 0s - loss: 0.2289 - acc: 0.9312
50944/60000 [========================>.....] - ETA: 0s - loss: 0.2270 - acc: 0.9316
52480/60000 [=========================>....] - ETA: 0s - loss: 0.2269 - acc: 0.9316
54272/60000 [==========================>...] - ETA: 0s - loss: 0.2258 - acc: 0.9319
56064/60000 [===========================>..] - ETA: 0s - loss: 0.2246 - acc: 0.9321
57088/60000 [===========================>..] - ETA: 0s - loss: 0.2238 - acc: 0.9322
58368/60000 [============================>.] - ETA: 0s - loss: 0.2230 - acc: 0.9325
59904/60000 [============================>.] - ETA: 0s - loss: 0.2226 - acc: 0.9327
60000/60000 [==============================] - 3s 44us/step - loss: 0.2228 - acc: 0.9326 - val_loss: 0.0930 - val_acc: 0.9701
Epoch 3/12

  256/60000 [..............................] - ETA: 2s - loss: 0.2512 - acc: 0.9180
 1792/60000 [..............................] - ETA: 2s - loss: 0.1665 - acc: 0.9492
 3328/60000 [>.............................] - ETA: 2s - loss: 0.1907 - acc: 0.9423
 4864/60000 [=>............................] - ETA: 1s - loss: 0.1886 - acc: 0.9433
 6400/60000 [==>...........................] - ETA: 1s - loss: 0.1837 - acc: 0.9453
 7680/60000 [==>...........................] - ETA: 1s - loss: 0.1827 - acc: 0.9458
 9216/60000 [===>..........................] - ETA: 1s - loss: 0.1861 - acc: 0.9461
10496/60000 [====>.........................] - ETA: 1s - loss: 0.1864 - acc: 0.9468
12288/60000 [=====>........................] - ETA: 1s - loss: 0.1810 - acc: 0.9478
14080/60000 [======>.......................] - ETA: 1s - loss: 0.1795 - acc: 0.9482
15872/60000 [======>.......................] - ETA: 1s - loss: 0.1772 - acc: 0.9487
17664/60000 [=======>......................] - ETA: 1s - loss: 0.1778 - acc: 0.9482
19200/60000 [========>.....................] - ETA: 1s - loss: 0.1770 - acc: 0.9487
21248/60000 [=========>....................] - ETA: 1s - loss: 0.1769 - acc: 0.9488
22528/60000 [==========>...................] - ETA: 1s - loss: 0.1780 - acc: 0.9485
24576/60000 [===========>..................] - ETA: 1s - loss: 0.1773 - acc: 0.9487
26112/60000 [============>.................] - ETA: 1s - loss: 0.1777 - acc: 0.9487
27648/60000 [============>.................] - ETA: 1s - loss: 0.1765 - acc: 0.9492
28672/60000 [=============>................] - ETA: 1s - loss: 0.1758 - acc: 0.9495
30208/60000 [==============>...............] - ETA: 1s - loss: 0.1761 - acc: 0.9495
31744/60000 [==============>...............] - ETA: 1s - loss: 0.1763 - acc: 0.9495
33280/60000 [===============>..............] - ETA: 1s - loss: 0.1761 - acc: 0.9497
34816/60000 [================>.............] - ETA: 0s - loss: 0.1756 - acc: 0.9496
36608/60000 [=================>............] - ETA: 0s - loss: 0.1741 - acc: 0.9500
38400/60000 [==================>...........] - ETA: 0s - loss: 0.1736 - acc: 0.9502
40192/60000 [===================>..........] - ETA: 0s - loss: 0.1730 - acc: 0.9506
41472/60000 [===================>..........] - ETA: 0s - loss: 0.1720 - acc: 0.9508
43264/60000 [====================>.........] - ETA: 0s - loss: 0.1719 - acc: 0.9508
44288/60000 [=====================>........] - ETA: 0s - loss: 0.1717 - acc: 0.9505
46336/60000 [======================>.......] - ETA: 0s - loss: 0.1715 - acc: 0.9503
47872/60000 [======================>.......] - ETA: 0s - loss: 0.1704 - acc: 0.9507
49408/60000 [=======================>......] - ETA: 0s - loss: 0.1706 - acc: 0.9507
51200/60000 [========================>.....] - ETA: 0s - loss: 0.1700 - acc: 0.9508
52224/60000 [=========================>....] - ETA: 0s - loss: 0.1696 - acc: 0.9507
53760/60000 [=========================>....] - ETA: 0s - loss: 0.1690 - acc: 0.9510
55040/60000 [==========================>...] - ETA: 0s - loss: 0.1682 - acc: 0.9511
56320/60000 [===========================>..] - ETA: 0s - loss: 0.1675 - acc: 0.9513
57088/60000 [===========================>..] - ETA: 0s - loss: 0.1670 - acc: 0.9515
58624/60000 [============================>.] - ETA: 0s - loss: 0.1662 - acc: 0.9516
59648/60000 [============================>.] - ETA: 0s - loss: 0.1661 - acc: 0.9517
60000/60000 [==============================] - 3s 45us/step - loss: 0.1663 - acc: 0.9516 - val_loss: 0.0767 - val_acc: 0.9754
Epoch 4/12

  256/60000 [..............................] - ETA: 3s - loss: 0.1365 - acc: 0.9609
 1536/60000 [..............................] - ETA: 2s - loss: 0.1532 - acc: 0.9525
 3328/60000 [>.............................] - ETA: 2s - loss: 0.1427 - acc: 0.9552
 5120/60000 [=>............................] - ETA: 2s - loss: 0.1453 - acc: 0.9535
 6656/60000 [==>...........................] - ETA: 2s - loss: 0.1393 - acc: 0.9564
 8192/60000 [===>..........................] - ETA: 2s - loss: 0.1413 - acc: 0.9562
 9472/60000 [===>..........................] - ETA: 2s - loss: 0.1424 - acc: 0.9553
11264/60000 [====>.........................] - ETA: 1s - loss: 0.1458 - acc: 0.9551
12544/60000 [=====>........................] - ETA: 1s - loss: 0.1459 - acc: 0.9546
14336/60000 [======>.......................] - ETA: 1s - loss: 0.1477 - acc: 0.9546
15360/60000 [======>.......................] - ETA: 1s - loss: 0.1475 - acc: 0.9549
17152/60000 [=======>......................] - ETA: 1s - loss: 0.1456 - acc: 0.9559
18176/60000 [========>.....................] - ETA: 1s - loss: 0.1451 - acc: 0.9559
19968/60000 [========>.....................] - ETA: 1s - loss: 0.1460 - acc: 0.9554
22016/60000 [==========>...................] - ETA: 1s - loss: 0.1457 - acc: 0.9554
23808/60000 [==========>...................] - ETA: 1s - loss: 0.1467 - acc: 0.9547
25600/60000 [===========>..................] - ETA: 1s - loss: 0.1472 - acc: 0.9542
27136/60000 [============>.................] - ETA: 1s - loss: 0.1477 - acc: 0.9538
28928/60000 [=============>................] - ETA: 1s - loss: 0.1473 - acc: 0.9539
30208/60000 [==============>...............] - ETA: 1s - loss: 0.1476 - acc: 0.9542
32000/60000 [===============>..............] - ETA: 1s - loss: 0.1472 - acc: 0.9547
33792/60000 [===============>..............] - ETA: 1s - loss: 0.1459 - acc: 0.9550
35328/60000 [================>.............] - ETA: 1s - loss: 0.1452 - acc: 0.9551
36864/60000 [=================>............] - ETA: 0s - loss: 0.1447 - acc: 0.9552
38656/60000 [==================>...........] - ETA: 0s - loss: 0.1445 - acc: 0.9551
39936/60000 [==================>...........] - ETA: 0s - loss: 0.1434 - acc: 0.9554
41472/60000 [===================>..........] - ETA: 0s - loss: 0.1429 - acc: 0.9557
43008/60000 [====================>.........] - ETA: 0s - loss: 0.1425 - acc: 0.9559
45056/60000 [=====================>........] - ETA: 0s - loss: 0.1419 - acc: 0.9562
46848/60000 [======================>.......] - ETA: 0s - loss: 0.1419 - acc: 0.9564
47360/60000 [======================>.......] - ETA: 0s - loss: 0.1415 - acc: 0.9565
49152/60000 [=======================>......] - ETA: 0s - loss: 0.1419 - acc: 0.9565
49920/60000 [=======================>......] - ETA: 0s - loss: 0.1416 - acc: 0.9566
50944/60000 [========================>.....] - ETA: 0s - loss: 0.1414 - acc: 0.9567
52736/60000 [=========================>....] - ETA: 0s - loss: 0.1418 - acc: 0.9566
54528/60000 [==========================>...] - ETA: 0s - loss: 0.1412 - acc: 0.9568
56064/60000 [===========================>..] - ETA: 0s - loss: 0.1412 - acc: 0.9568
56832/60000 [===========================>..] - ETA: 0s - loss: 0.1412 - acc: 0.9569
57856/60000 [===========================>..] - ETA: 0s - loss: 0.1411 - acc: 0.9569
59136/60000 [============================>.] - ETA: 0s - loss: 0.1402 - acc: 0.9572
60000/60000 [==============================] - 3s 47us/step - loss: 0.1400 - acc: 0.9572 - val_loss: 0.0613 - val_acc: 0.9815
Epoch 5/12

  256/60000 [..............................] - ETA: 0s - loss: 0.0997 - acc: 0.9766
 1024/60000 [..............................] - ETA: 3s - loss: 0.1280 - acc: 0.9619
 2048/60000 [>.............................] - ETA: 3s - loss: 0.1307 - acc: 0.9570
 3584/60000 [>.............................] - ETA: 2s - loss: 0.1296 - acc: 0.9601
 4864/60000 [=>............................] - ETA: 2s - loss: 0.1263 - acc: 0.9626
 5888/60000 [=>............................] - ETA: 2s - loss: 0.1318 - acc: 0.9608
 7680/60000 [==>...........................] - ETA: 2s - loss: 0.1321 - acc: 0.9618
 9216/60000 [===>..........................] - ETA: 2s - loss: 0.1291 - acc: 0.9629
11008/60000 [====>.........................] - ETA: 2s - loss: 0.1302 - acc: 0.9619
12544/60000 [=====>........................] - ETA: 2s - loss: 0.1294 - acc: 0.9621
14336/60000 [======>.......................] - ETA: 2s - loss: 0.1314 - acc: 0.9618
16128/60000 [=======>......................] - ETA: 1s - loss: 0.1296 - acc: 0.9619
17152/60000 [=======>......................] - ETA: 1s - loss: 0.1290 - acc: 0.9620
18432/60000 [========>.....................] - ETA: 1s - loss: 0.1284 - acc: 0.9619
19712/60000 [========>.....................] - ETA: 1s - loss: 0.1289 - acc: 0.9619
20992/60000 [=========>....................] - ETA: 1s - loss: 0.1277 - acc: 0.9624
22528/60000 [==========>...................] - ETA: 1s - loss: 0.1275 - acc: 0.9625
24064/60000 [===========>..................] - ETA: 1s - loss: 0.1267 - acc: 0.9624
25088/60000 [===========>..................] - ETA: 1s - loss: 0.1277 - acc: 0.9623
26112/60000 [============>.................] - ETA: 1s - loss: 0.1272 - acc: 0.9625
27648/60000 [============>.................] - ETA: 1s - loss: 0.1260 - acc: 0.9627
29184/60000 [=============>................] - ETA: 1s - loss: 0.1266 - acc: 0.9625
30976/60000 [==============>...............] - ETA: 1s - loss: 0.1269 - acc: 0.9623
32512/60000 [===============>..............] - ETA: 1s - loss: 0.1269 - acc: 0.9624
33536/60000 [===============>..............] - ETA: 1s - loss: 0.1263 - acc: 0.9623
34560/60000 [================>.............] - ETA: 1s - loss: 0.1263 - acc: 0.9623
36352/60000 [=================>............] - ETA: 1s - loss: 0.1258 - acc: 0.9625
37632/60000 [=================>............] - ETA: 1s - loss: 0.1252 - acc: 0.9627
38912/60000 [==================>...........] - ETA: 0s - loss: 0.1246 - acc: 0.9629
40448/60000 [===================>..........] - ETA: 0s - loss: 0.1249 - acc: 0.9627
42240/60000 [====================>.........] - ETA: 0s - loss: 0.1246 - acc: 0.9625
44032/60000 [=====================>........] - ETA: 0s - loss: 0.1246 - acc: 0.9625
45056/60000 [=====================>........] - ETA: 0s - loss: 0.1243 - acc: 0.9626
46592/60000 [======================>.......] - ETA: 0s - loss: 0.1243 - acc: 0.9627
47872/60000 [======================>.......] - ETA: 0s - loss: 0.1238 - acc: 0.9627
49408/60000 [=======================>......] - ETA: 0s - loss: 0.1237 - acc: 0.9628
50944/60000 [========================>.....] - ETA: 0s - loss: 0.1240 - acc: 0.9629
52480/60000 [=========================>....] - ETA: 0s - loss: 0.1242 - acc: 0.9630
53504/60000 [=========================>....] - ETA: 0s - loss: 0.1240 - acc: 0.9630
55040/60000 [==========================>...] - ETA: 0s - loss: 0.1241 - acc: 0.9629
56320/60000 [===========================>..] - ETA: 0s - loss: 0.1248 - acc: 0.9626
58112/60000 [============================>.] - ETA: 0s - loss: 0.1241 - acc: 0.9628
59648/60000 [============================>.] - ETA: 0s - loss: 0.1236 - acc: 0.9629
60000/60000 [==============================] - 3s 49us/step - loss: 0.1236 - acc: 0.9630 - val_loss: 0.0554 - val_acc: 0.9832
Epoch 6/12

  256/60000 [..............................] - ETA: 3s - loss: 0.1416 - acc: 0.9531
 2304/60000 [>.............................] - ETA: 1s - loss: 0.1248 - acc: 0.9635
 3072/60000 [>.............................] - ETA: 2s - loss: 0.1224 - acc: 0.9645
 4352/60000 [=>............................] - ETA: 2s - loss: 0.1279 - acc: 0.9632
 6144/60000 [==>...........................] - ETA: 2s - loss: 0.1197 - acc: 0.9634
 7680/60000 [==>...........................] - ETA: 2s - loss: 0.1162 - acc: 0.9642
 9472/60000 [===>..........................] - ETA: 2s - loss: 0.1144 - acc: 0.9645
10496/60000 [====>.........................] - ETA: 2s - loss: 0.1130 - acc: 0.9644
12032/60000 [=====>........................] - ETA: 2s - loss: 0.1147 - acc: 0.9639
13056/60000 [=====>........................] - ETA: 2s - loss: 0.1144 - acc: 0.9642
15104/60000 [======>.......................] - ETA: 1s - loss: 0.1144 - acc: 0.9643
16640/60000 [=======>......................] - ETA: 1s - loss: 0.1166 - acc: 0.9637
17920/60000 [=======>......................] - ETA: 1s - loss: 0.1157 - acc: 0.9645
19200/60000 [========>.....................] - ETA: 1s - loss: 0.1163 - acc: 0.9644
20736/60000 [=========>....................] - ETA: 1s - loss: 0.1172 - acc: 0.9641
22528/60000 [==========>...................] - ETA: 1s - loss: 0.1160 - acc: 0.9649
24320/60000 [===========>..................] - ETA: 1s - loss: 0.1148 - acc: 0.9652
25600/60000 [===========>..................] - ETA: 1s - loss: 0.1147 - acc: 0.9653
27136/60000 [============>.................] - ETA: 1s - loss: 0.1138 - acc: 0.9654
28416/60000 [=============>................] - ETA: 1s - loss: 0.1139 - acc: 0.9653
29696/60000 [=============>................] - ETA: 1s - loss: 0.1143 - acc: 0.9653
31232/60000 [==============>...............] - ETA: 1s - loss: 0.1141 - acc: 0.9656
32256/60000 [===============>..............] - ETA: 1s - loss: 0.1141 - acc: 0.9653
33280/60000 [===============>..............] - ETA: 1s - loss: 0.1152 - acc: 0.9652
34560/60000 [================>.............] - ETA: 1s - loss: 0.1155 - acc: 0.9651
36352/60000 [=================>............] - ETA: 1s - loss: 0.1146 - acc: 0.9654
38400/60000 [==================>...........] - ETA: 0s - loss: 0.1151 - acc: 0.9655
39936/60000 [==================>...........] - ETA: 0s - loss: 0.1149 - acc: 0.9656
41728/60000 [===================>..........] - ETA: 0s - loss: 0.1149 - acc: 0.9655
43008/60000 [====================>.........] - ETA: 0s - loss: 0.1147 - acc: 0.9655
44544/60000 [=====================>........] - ETA: 0s - loss: 0.1139 - acc: 0.9656
46336/60000 [======================>.......] - ETA: 0s - loss: 0.1131 - acc: 0.9656
47872/60000 [======================>.......] - ETA: 0s - loss: 0.1122 - acc: 0.9659
49408/60000 [=======================>......] - ETA: 0s - loss: 0.1125 - acc: 0.9658
50688/60000 [========================>.....] - ETA: 0s - loss: 0.1123 - acc: 0.9659
52480/60000 [=========================>....] - ETA: 0s - loss: 0.1123 - acc: 0.9660
53504/60000 [=========================>....] - ETA: 0s - loss: 0.1121 - acc: 0.9659
55296/60000 [==========================>...] - ETA: 0s - loss: 0.1120 - acc: 0.9660
56320/60000 [===========================>..] - ETA: 0s - loss: 0.1122 - acc: 0.9660
57600/60000 [===========================>..] - ETA: 0s - loss: 0.1121 - acc: 0.9661
59392/60000 [============================>.] - ETA: 0s - loss: 0.1116 - acc: 0.9662
60000/60000 [==============================] - 3s 46us/step - loss: 0.1115 - acc: 0.9663 - val_loss: 0.0523 - val_acc: 0.9835
Epoch 7/12

  256/60000 [..............................] - ETA: 3s - loss: 0.1286 - acc: 0.9492
 1536/60000 [..............................] - ETA: 2s - loss: 0.1475 - acc: 0.9525
 3328/60000 [>.............................] - ETA: 2s - loss: 0.1350 - acc: 0.9588
 5120/60000 [=>............................] - ETA: 2s - loss: 0.1244 - acc: 0.9633
 6656/60000 [==>...........................] - ETA: 2s - loss: 0.1171 - acc: 0.9647
 8192/60000 [===>..........................] - ETA: 2s - loss: 0.1134 - acc: 0.9657
 9728/60000 [===>..........................] - ETA: 2s - loss: 0.1135 - acc: 0.9655
11264/60000 [====>.........................] - ETA: 2s - loss: 0.1110 - acc: 0.9662
13056/60000 [=====>........................] - ETA: 1s - loss: 0.1092 - acc: 0.9671
14592/60000 [======>.......................] - ETA: 1s - loss: 0.1077 - acc: 0.9679
15872/60000 [======>.......................] - ETA: 1s - loss: 0.1052 - acc: 0.9686
17664/60000 [=======>......................] - ETA: 1s - loss: 0.1078 - acc: 0.9681
18944/60000 [========>.....................] - ETA: 1s - loss: 0.1079 - acc: 0.9680
20736/60000 [=========>....................] - ETA: 1s - loss: 0.1080 - acc: 0.9680
22272/60000 [==========>...................] - ETA: 1s - loss: 0.1083 - acc: 0.9674
23552/60000 [==========>...................] - ETA: 1s - loss: 0.1081 - acc: 0.9675
24576/60000 [===========>..................] - ETA: 1s - loss: 0.1068 - acc: 0.9679
26368/60000 [============>.................] - ETA: 1s - loss: 0.1051 - acc: 0.9685
27392/60000 [============>.................] - ETA: 1s - loss: 0.1051 - acc: 0.9683
28672/60000 [=============>................] - ETA: 1s - loss: 0.1044 - acc: 0.9688
29696/60000 [=============>................] - ETA: 1s - loss: 0.1043 - acc: 0.9689
31232/60000 [==============>...............] - ETA: 1s - loss: 0.1040 - acc: 0.9689
32768/60000 [===============>..............] - ETA: 1s - loss: 0.1038 - acc: 0.9690
34304/60000 [================>.............] - ETA: 1s - loss: 0.1040 - acc: 0.9692
35584/60000 [================>.............] - ETA: 1s - loss: 0.1040 - acc: 0.9692
37632/60000 [=================>............] - ETA: 0s - loss: 0.1033 - acc: 0.9694
38656/60000 [==================>...........] - ETA: 0s - loss: 0.1036 - acc: 0.9693
40448/60000 [===================>..........] - ETA: 0s - loss: 0.1029 - acc: 0.9695
41984/60000 [===================>..........] - ETA: 0s - loss: 0.1032 - acc: 0.9695
43264/60000 [====================>.........] - ETA: 0s - loss: 0.1028 - acc: 0.9696
45056/60000 [=====================>........] - ETA: 0s - loss: 0.1039 - acc: 0.9694
46848/60000 [======================>.......] - ETA: 0s - loss: 0.1029 - acc: 0.9696
47616/60000 [======================>.......] - ETA: 0s - loss: 0.1028 - acc: 0.9696
49408/60000 [=======================>......] - ETA: 0s - loss: 0.1025 - acc: 0.9697
50944/60000 [========================>.....] - ETA: 0s - loss: 0.1026 - acc: 0.9697
52224/60000 [=========================>....] - ETA: 0s - loss: 0.1028 - acc: 0.9695
53760/60000 [=========================>....] - ETA: 0s - loss: 0.1030 - acc: 0.9693
54784/60000 [==========================>...] - ETA: 0s - loss: 0.1029 - acc: 0.9693
56064/60000 [===========================>..] - ETA: 0s - loss: 0.1026 - acc: 0.9695
57088/60000 [===========================>..] - ETA: 0s - loss: 0.1027 - acc: 0.9694
58624/60000 [============================>.] - ETA: 0s - loss: 0.1022 - acc: 0.9694
60000/60000 [==============================] - 3s 48us/step - loss: 0.1016 - acc: 0.9695 - val_loss: 0.0463 - val_acc: 0.9847
Epoch 8/12

  256/60000 [..............................] - ETA: 0s - loss: 0.0829 - acc: 0.9727
 1792/60000 [..............................] - ETA: 2s - loss: 0.0928 - acc: 0.9715
 3328/60000 [>.............................] - ETA: 2s - loss: 0.0905 - acc: 0.9721
 5120/60000 [=>............................] - ETA: 2s - loss: 0.0967 - acc: 0.9717
 6912/60000 [==>...........................] - ETA: 2s - loss: 0.0938 - acc: 0.9716
 8704/60000 [===>..........................] - ETA: 2s - loss: 0.0932 - acc: 0.9712
 9216/60000 [===>..........................] - ETA: 2s - loss: 0.0927 - acc: 0.9715
10752/60000 [====>.........................] - ETA: 2s - loss: 0.0957 - acc: 0.9709
12288/60000 [=====>........................] - ETA: 2s - loss: 0.0976 - acc: 0.9702
13568/60000 [=====>........................] - ETA: 2s - loss: 0.0986 - acc: 0.9701
14848/60000 [======>.......................] - ETA: 1s - loss: 0.1024 - acc: 0.9693
16384/60000 [=======>......................] - ETA: 1s - loss: 0.1010 - acc: 0.9698
18176/60000 [========>.....................] - ETA: 1s - loss: 0.1002 - acc: 0.9701
18944/60000 [========>.....................] - ETA: 1s - loss: 0.1001 - acc: 0.9701
20480/60000 [=========>....................] - ETA: 1s - loss: 0.0986 - acc: 0.9706
21504/60000 [=========>....................] - ETA: 1s - loss: 0.0995 - acc: 0.9704
23296/60000 [==========>...................] - ETA: 1s - loss: 0.1000 - acc: 0.9701
25088/60000 [===========>..................] - ETA: 1s - loss: 0.0996 - acc: 0.9701
26368/60000 [============>.................] - ETA: 1s - loss: 0.0983 - acc: 0.9704
27392/60000 [============>.................] - ETA: 1s - loss: 0.0991 - acc: 0.9702
28416/60000 [=============>................] - ETA: 1s - loss: 0.0997 - acc: 0.9701
29952/60000 [=============>................] - ETA: 1s - loss: 0.0996 - acc: 0.9703
31488/60000 [==============>...............] - ETA: 1s - loss: 0.1000 - acc: 0.9702
33024/60000 [===============>..............] - ETA: 1s - loss: 0.1003 - acc: 0.9704
34304/60000 [================>.............] - ETA: 1s - loss: 0.1006 - acc: 0.9704
35328/60000 [================>.............] - ETA: 1s - loss: 0.1002 - acc: 0.9705
36864/60000 [=================>............] - ETA: 1s - loss: 0.0994 - acc: 0.9709
38400/60000 [==================>...........] - ETA: 0s - loss: 0.0986 - acc: 0.9710
39936/60000 [==================>...........] - ETA: 0s - loss: 0.0982 - acc: 0.9711
41728/60000 [===================>..........] - ETA: 0s - loss: 0.0980 - acc: 0.9711
43264/60000 [====================>.........] - ETA: 0s - loss: 0.0986 - acc: 0.9708
45056/60000 [=====================>........] - ETA: 0s - loss: 0.0980 - acc: 0.9710
46592/60000 [======================>.......] - ETA: 0s - loss: 0.0976 - acc: 0.9710
47872/60000 [======================>.......] - ETA: 0s - loss: 0.0975 - acc: 0.9711
49408/60000 [=======================>......] - ETA: 0s - loss: 0.0974 - acc: 0.9709
51200/60000 [========================>.....] - ETA: 0s - loss: 0.0975 - acc: 0.9709
52736/60000 [=========================>....] - ETA: 0s - loss: 0.0971 - acc: 0.9710
54272/60000 [==========================>...] - ETA: 0s - loss: 0.0970 - acc: 0.9710
55808/60000 [==========================>...] - ETA: 0s - loss: 0.0966 - acc: 0.9711
56832/60000 [===========================>..] - ETA: 0s - loss: 0.0960 - acc: 0.9712
58368/60000 [============================>.] - ETA: 0s - loss: 0.0959 - acc: 0.9712
59904/60000 [============================>.] - ETA: 0s - loss: 0.0959 - acc: 0.9712
60000/60000 [==============================] - 3s 47us/step - loss: 0.0959 - acc: 0.9711 - val_loss: 0.0434 - val_acc: 0.9858
Epoch 9/12

  256/60000 [..............................] - ETA: 3s - loss: 0.1282 - acc: 0.9727
 1792/60000 [..............................] - ETA: 2s - loss: 0.0843 - acc: 0.9732
 3072/60000 [>.............................] - ETA: 2s - loss: 0.0922 - acc: 0.9704
 4608/60000 [=>............................] - ETA: 2s - loss: 0.0925 - acc: 0.9714
 6144/60000 [==>...........................] - ETA: 2s - loss: 0.0936 - acc: 0.9717
 7424/60000 [==>...........................] - ETA: 2s - loss: 0.0938 - acc: 0.9720
 8448/60000 [===>..........................] - ETA: 2s - loss: 0.0918 - acc: 0.9727
 9984/60000 [===>..........................] - ETA: 2s - loss: 0.0916 - acc: 0.9729
11520/60000 [====>.........................] - ETA: 2s - loss: 0.0924 - acc: 0.9723
13056/60000 [=====>........................] - ETA: 2s - loss: 0.0940 - acc: 0.9720
14080/60000 [======>.......................] - ETA: 2s - loss: 0.0931 - acc: 0.9724
15104/60000 [======>.......................] - ETA: 2s - loss: 0.0936 - acc: 0.9719
16896/60000 [=======>......................] - ETA: 1s - loss: 0.0944 - acc: 0.9716
18176/60000 [========>.....................] - ETA: 1s - loss: 0.0945 - acc: 0.9717
19712/60000 [========>.....................] - ETA: 1s - loss: 0.0937 - acc: 0.9718
21248/60000 [=========>....................] - ETA: 1s - loss: 0.0957 - acc: 0.9712
22784/60000 [==========>...................] - ETA: 1s - loss: 0.0955 - acc: 0.9713
24320/60000 [===========>..................] - ETA: 1s - loss: 0.0959 - acc: 0.9713
25600/60000 [===========>..................] - ETA: 1s - loss: 0.0964 - acc: 0.9711
26880/60000 [============>.................] - ETA: 1s - loss: 0.0971 - acc: 0.9708
28160/60000 [=============>................] - ETA: 1s - loss: 0.0965 - acc: 0.9711
28928/60000 [=============>................] - ETA: 1s - loss: 0.0960 - acc: 0.9713
30208/60000 [==============>...............] - ETA: 1s - loss: 0.0957 - acc: 0.9714
32000/60000 [===============>..............] - ETA: 1s - loss: 0.0954 - acc: 0.9714
33792/60000 [===============>..............] - ETA: 1s - loss: 0.0948 - acc: 0.9717
35584/60000 [================>.............] - ETA: 1s - loss: 0.0940 - acc: 0.9719
37632/60000 [=================>............] - ETA: 0s - loss: 0.0932 - acc: 0.9721
38912/60000 [==================>...........] - ETA: 0s - loss: 0.0929 - acc: 0.9722
40192/60000 [===================>..........] - ETA: 0s - loss: 0.0927 - acc: 0.9722
41472/60000 [===================>..........] - ETA: 0s - loss: 0.0933 - acc: 0.9721
42496/60000 [====================>.........] - ETA: 0s - loss: 0.0938 - acc: 0.9721
44032/60000 [=====================>........] - ETA: 0s - loss: 0.0928 - acc: 0.9723
45824/60000 [=====================>........] - ETA: 0s - loss: 0.0925 - acc: 0.9726
47104/60000 [======================>.......] - ETA: 0s - loss: 0.0925 - acc: 0.9727
48640/60000 [=======================>......] - ETA: 0s - loss: 0.0919 - acc: 0.9729
49920/60000 [=======================>......] - ETA: 0s - loss: 0.0911 - acc: 0.9731
51712/60000 [========================>.....] - ETA: 0s - loss: 0.0912 - acc: 0.9732
53504/60000 [=========================>....] - ETA: 0s - loss: 0.0909 - acc: 0.9732
54784/60000 [==========================>...] - ETA: 0s - loss: 0.0907 - acc: 0.9732
56064/60000 [===========================>..] - ETA: 0s - loss: 0.0908 - acc: 0.9732
57600/60000 [===========================>..] - ETA: 0s - loss: 0.0902 - acc: 0.9733
58624/60000 [============================>.] - ETA: 0s - loss: 0.0903 - acc: 0.9733
60000/60000 [==============================] - 3s 47us/step - loss: 0.0903 - acc: 0.9734 - val_loss: 0.0406 - val_acc: 0.9874
Epoch 10/12

  256/60000 [..............................] - ETA: 4s - loss: 0.0912 - acc: 0.9648
 1792/60000 [..............................] - ETA: 2s - loss: 0.0857 - acc: 0.9738
 3584/60000 [>.............................] - ETA: 2s - loss: 0.0885 - acc: 0.9749
 5632/60000 [=>............................] - ETA: 2s - loss: 0.0835 - acc: 0.9757
 7424/60000 [==>...........................] - ETA: 1s - loss: 0.0805 - acc: 0.9766
 8704/60000 [===>..........................] - ETA: 1s - loss: 0.0794 - acc: 0.9760
10240/60000 [====>.........................] - ETA: 1s - loss: 0.0784 - acc: 0.9766
11520/60000 [====>.........................] - ETA: 1s - loss: 0.0806 - acc: 0.9761
12288/60000 [=====>........................] - ETA: 2s - loss: 0.0804 - acc: 0.9760
14080/60000 [======>.......................] - ETA: 1s - loss: 0.0825 - acc: 0.9756
16128/60000 [=======>......................] - ETA: 1s - loss: 0.0830 - acc: 0.9751
17408/60000 [=======>......................] - ETA: 1s - loss: 0.0825 - acc: 0.9754
18944/60000 [========>.....................] - ETA: 1s - loss: 0.0810 - acc: 0.9761
20480/60000 [=========>....................] - ETA: 1s - loss: 0.0818 - acc: 0.9758
21504/60000 [=========>....................] - ETA: 1s - loss: 0.0824 - acc: 0.9754
22784/60000 [==========>...................] - ETA: 1s - loss: 0.0830 - acc: 0.9753
24576/60000 [===========>..................] - ETA: 1s - loss: 0.0824 - acc: 0.9755
25856/60000 [===========>..................] - ETA: 1s - loss: 0.0820 - acc: 0.9758
27392/60000 [============>.................] - ETA: 1s - loss: 0.0820 - acc: 0.9758
28928/60000 [=============>................] - ETA: 1s - loss: 0.0807 - acc: 0.9763
30720/60000 [==============>...............] - ETA: 1s - loss: 0.0809 - acc: 0.9759
32000/60000 [===============>..............] - ETA: 1s - loss: 0.0807 - acc: 0.9759
33792/60000 [===============>..............] - ETA: 1s - loss: 0.0809 - acc: 0.9761
35328/60000 [================>.............] - ETA: 1s - loss: 0.0811 - acc: 0.9761
36864/60000 [=================>............] - ETA: 0s - loss: 0.0821 - acc: 0.9758
38400/60000 [==================>...........] - ETA: 0s - loss: 0.0818 - acc: 0.9760
40192/60000 [===================>..........] - ETA: 0s - loss: 0.0820 - acc: 0.9758
41728/60000 [===================>..........] - ETA: 0s - loss: 0.0820 - acc: 0.9756
43264/60000 [====================>.........] - ETA: 0s - loss: 0.0821 - acc: 0.9755
44800/60000 [=====================>........] - ETA: 0s - loss: 0.0824 - acc: 0.9753
46592/60000 [======================>.......] - ETA: 0s - loss: 0.0822 - acc: 0.9754
47872/60000 [======================>.......] - ETA: 0s - loss: 0.0829 - acc: 0.9752
49152/60000 [=======================>......] - ETA: 0s - loss: 0.0829 - acc: 0.9752
50688/60000 [========================>.....] - ETA: 0s - loss: 0.0824 - acc: 0.9754
52480/60000 [=========================>....] - ETA: 0s - loss: 0.0832 - acc: 0.9753
54272/60000 [==========================>...] - ETA: 0s - loss: 0.0831 - acc: 0.9755
55552/60000 [==========================>...] - ETA: 0s - loss: 0.0833 - acc: 0.9755
57344/60000 [===========================>..] - ETA: 0s - loss: 0.0832 - acc: 0.9755
59136/60000 [============================>.] - ETA: 0s - loss: 0.0834 - acc: 0.9755
60000/60000 [==============================] - 3s 45us/step - loss: 0.0832 - acc: 0.9755 - val_loss: 0.0384 - val_acc: 0.9876
Epoch 11/12

  256/60000 [..............................] - ETA: 3s - loss: 0.1498 - acc: 0.9570
 1024/60000 [..............................] - ETA: 4s - loss: 0.0690 - acc: 0.9814
 2560/60000 [>.............................] - ETA: 3s - loss: 0.0724 - acc: 0.9785
 3840/60000 [>.............................] - ETA: 2s - loss: 0.0788 - acc: 0.9768
 5376/60000 [=>............................] - ETA: 2s - loss: 0.0794 - acc: 0.9760
 6656/60000 [==>...........................] - ETA: 2s - loss: 0.0788 - acc: 0.9763
 8192/60000 [===>..........................] - ETA: 2s - loss: 0.0784 - acc: 0.9768
 9472/60000 [===>..........................] - ETA: 2s - loss: 0.0783 - acc: 0.9768
10752/60000 [====>.........................] - ETA: 2s - loss: 0.0765 - acc: 0.9772
11776/60000 [====>.........................] - ETA: 2s - loss: 0.0765 - acc: 0.9772
13312/60000 [=====>........................] - ETA: 2s - loss: 0.0778 - acc: 0.9769
14336/60000 [======>.......................] - ETA: 2s - loss: 0.0768 - acc: 0.9771
16128/60000 [=======>......................] - ETA: 2s - loss: 0.0771 - acc: 0.9771
17920/60000 [=======>......................] - ETA: 1s - loss: 0.0777 - acc: 0.9767
19712/60000 [========>.....................] - ETA: 1s - loss: 0.0774 - acc: 0.9770
21248/60000 [=========>....................] - ETA: 1s - loss: 0.0773 - acc: 0.9770
23040/60000 [==========>...................] - ETA: 1s - loss: 0.0784 - acc: 0.9767
24320/60000 [===========>..................] - ETA: 1s - loss: 0.0788 - acc: 0.9768
25856/60000 [===========>..................] - ETA: 1s - loss: 0.0784 - acc: 0.9769
27136/60000 [============>.................] - ETA: 1s - loss: 0.0790 - acc: 0.9767
28928/60000 [=============>................] - ETA: 1s - loss: 0.0797 - acc: 0.9767
29952/60000 [=============>................] - ETA: 1s - loss: 0.0794 - acc: 0.9769
31744/60000 [==============>...............] - ETA: 1s - loss: 0.0793 - acc: 0.9769
33536/60000 [===============>..............] - ETA: 1s - loss: 0.0796 - acc: 0.9767
34560/60000 [================>.............] - ETA: 1s - loss: 0.0792 - acc: 0.9769
36352/60000 [=================>............] - ETA: 1s - loss: 0.0793 - acc: 0.9768
37888/60000 [=================>............] - ETA: 0s - loss: 0.0787 - acc: 0.9769
39168/60000 [==================>...........] - ETA: 0s - loss: 0.0784 - acc: 0.9771
40960/60000 [===================>..........] - ETA: 0s - loss: 0.0789 - acc: 0.9770
42240/60000 [====================>.........] - ETA: 0s - loss: 0.0786 - acc: 0.9772
44032/60000 [=====================>........] - ETA: 0s - loss: 0.0783 - acc: 0.9773
45312/60000 [=====================>........] - ETA: 0s - loss: 0.0790 - acc: 0.9772
46592/60000 [======================>.......] - ETA: 0s - loss: 0.0794 - acc: 0.9770
47872/60000 [======================>.......] - ETA: 0s - loss: 0.0801 - acc: 0.9769
48896/60000 [=======================>......] - ETA: 0s - loss: 0.0798 - acc: 0.9769
50688/60000 [========================>.....] - ETA: 0s - loss: 0.0798 - acc: 0.9767
52224/60000 [=========================>....] - ETA: 0s - loss: 0.0798 - acc: 0.9767
53760/60000 [=========================>....] - ETA: 0s - loss: 0.0798 - acc: 0.9767
55296/60000 [==========================>...] - ETA: 0s - loss: 0.0803 - acc: 0.9765
56576/60000 [===========================>..] - ETA: 0s - loss: 0.0804 - acc: 0.9764
57856/60000 [===========================>..] - ETA: 0s - loss: 0.0805 - acc: 0.9762
59392/60000 [============================>.] - ETA: 0s - loss: 0.0807 - acc: 0.9759
60000/60000 [==============================] - 3s 47us/step - loss: 0.0807 - acc: 0.9760 - val_loss: 0.0357 - val_acc: 0.9884
Epoch 12/12

  256/60000 [..............................] - ETA: 3s - loss: 0.0694 - acc: 0.9766
 1536/60000 [..............................] - ETA: 2s - loss: 0.0763 - acc: 0.9772
 2816/60000 [>.............................] - ETA: 2s - loss: 0.0788 - acc: 0.9755
 4608/60000 [=>............................] - ETA: 2s - loss: 0.0774 - acc: 0.9753
 5632/60000 [=>............................] - ETA: 2s - loss: 0.0770 - acc: 0.9755
 7168/60000 [==>...........................] - ETA: 2s - loss: 0.0763 - acc: 0.9759
 8704/60000 [===>..........................] - ETA: 2s - loss: 0.0739 - acc: 0.9760
 9984/60000 [===>..........................] - ETA: 2s - loss: 0.0740 - acc: 0.9760
10752/60000 [====>.........................] - ETA: 2s - loss: 0.0762 - acc: 0.9751
12288/60000 [=====>........................] - ETA: 2s - loss: 0.0757 - acc: 0.9754
13568/60000 [=====>........................] - ETA: 2s - loss: 0.0792 - acc: 0.9750
15104/60000 [======>.......................] - ETA: 2s - loss: 0.0806 - acc: 0.9751
16896/60000 [=======>......................] - ETA: 2s - loss: 0.0792 - acc: 0.9754
18688/60000 [========>.....................] - ETA: 1s - loss: 0.0781 - acc: 0.9759
20224/60000 [=========>....................] - ETA: 1s - loss: 0.0799 - acc: 0.9755
21504/60000 [=========>....................] - ETA: 1s - loss: 0.0804 - acc: 0.9752
22784/60000 [==========>...................] - ETA: 1s - loss: 0.0798 - acc: 0.9758
24576/60000 [===========>..................] - ETA: 1s - loss: 0.0787 - acc: 0.9761
25856/60000 [===========>..................] - ETA: 1s - loss: 0.0787 - acc: 0.9760
26880/60000 [============>.................] - ETA: 1s - loss: 0.0789 - acc: 0.9760
28672/60000 [=============>................] - ETA: 1s - loss: 0.0782 - acc: 0.9762
30464/60000 [==============>...............] - ETA: 1s - loss: 0.0782 - acc: 0.9762
31744/60000 [==============>...............] - ETA: 1s - loss: 0.0788 - acc: 0.9760
33536/60000 [===============>..............] - ETA: 1s - loss: 0.0783 - acc: 0.9762
35584/60000 [================>.............] - ETA: 1s - loss: 0.0778 - acc: 0.9764
37376/60000 [=================>............] - ETA: 0s - loss: 0.0785 - acc: 0.9762
38656/60000 [==================>...........] - ETA: 0s - loss: 0.0789 - acc: 0.9762
40192/60000 [===================>..........] - ETA: 0s - loss: 0.0792 - acc: 0.9761
41984/60000 [===================>..........] - ETA: 0s - loss: 0.0790 - acc: 0.9762
43520/60000 [====================>.........] - ETA: 0s - loss: 0.0788 - acc: 0.9763
45312/60000 [=====================>........] - ETA: 0s - loss: 0.0783 - acc: 0.9764
46592/60000 [======================>.......] - ETA: 0s - loss: 0.0782 - acc: 0.9765
47616/60000 [======================>.......] - ETA: 0s - loss: 0.0778 - acc: 0.9766
49152/60000 [=======================>......] - ETA: 0s - loss: 0.0781 - acc: 0.9765
50944/60000 [========================>.....] - ETA: 0s - loss: 0.0781 - acc: 0.9765
52480/60000 [=========================>....] - ETA: 0s - loss: 0.0783 - acc: 0.9764
53504/60000 [=========================>....] - ETA: 0s - loss: 0.0782 - acc: 0.9765
54784/60000 [==========================>...] - ETA: 0s - loss: 0.0777 - acc: 0.9767
56064/60000 [===========================>..] - ETA: 0s - loss: 0.0773 - acc: 0.9768
57088/60000 [===========================>..] - ETA: 0s - loss: 0.0771 - acc: 0.9768
58624/60000 [============================>.] - ETA: 0s - loss: 0.0772 - acc: 0.9768
60000/60000 [==============================] - 3s 46us/step - loss: 0.0777 - acc: 0.9766 - val_loss: 0.0353 - val_acc: 0.9883
Test score: 0.0353006902865
Test accuracy: 0.9883

Process finished with exit code 0


展开阅读全文

没有更多推荐了,返回首页