DL之Attention:基于ClutteredMNIST手写数字图片数据集分别利用CNN_Init、ST_CNN算法(CNN+SpatialTransformer)实现多分类预测(一)

简介: DL之Attention:基于ClutteredMNIST手写数字图片数据集分别利用CNN_Init、ST_CNN算法(CNN+SpatialTransformer)实现多分类预测

数据特征工程


image.png


Train samples: (50000, 60, 60, 1)

Validation samples: (10000, 60, 60, 1)

Test samples: (10000, 60, 60, 1)

Input shape: (60, 60, 1)


T1、CNN_Init start


输出结果


T1、CNN_Init start!

_________________________________________________________________

Layer (type)                 Output Shape              Param #  

=================================================================

conv2d_1 (Conv2D)            (None, 58, 58, 32)        320      

_________________________________________________________________

conv2d_2 (Conv2D)            (None, 56, 56, 64)        18496    

_________________________________________________________________

max_pooling2d_1 (MaxPooling2 (None, 28, 28, 64)        0        

_________________________________________________________________

conv2d_3 (Conv2D)            (None, 26, 26, 64)        36928    

_________________________________________________________________

max_pooling2d_2 (MaxPooling2 (None, 13, 13, 64)        0        

_________________________________________________________________

conv2d_4 (Conv2D)            (None, 11, 11, 64)        36928    

_________________________________________________________________

dropout_1 (Dropout)          (None, 11, 11, 64)        0        

_________________________________________________________________

flatten_1 (Flatten)          (None, 7744)              0        

_________________________________________________________________

dense_1 (Dense)              (None, 128)               991360    

_________________________________________________________________

dropout_2 (Dropout)          (None, 128)               0        

_________________________________________________________________

dense_2 (Dense)              (None, 10)                1290      

=================================================================

Total params: 1,085,322

Trainable params: 1,085,322

Non-trainable params: 0

_________________________________________________________________

None

Train on 50000 samples, validate on 10000 samples

Epoch 1/30

核心代码


   #(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(Conv2D(64, kernel_size=(3, 3),

                    activation='relu'))

   model.add(MaxPooling2D(pool_size=(2, 2)))

   model.add(Conv2D(64, (3, 3), activation='relu'))

   model.add(Dropout(0.25))

   model.add(Flatten())

   model.add(Dense(128, activation='relu'))

   model.add(Dropout(0.5))

   model.add(Dense(nb_classes, activation='softmax'))






T2、ST_CNN start


_________________________________________________________________

Layer (type)                 Output Shape              Param #  

=================================================================

conv2d_1 (Conv2D)            (None, 56, 56, 32)        832      

_________________________________________________________________

activation_1 (Activation)    (None, 56, 56, 32)        0        

_________________________________________________________________

max_pooling2d_1 (MaxPooling2 (None, 28, 28, 32)        0        

_________________________________________________________________

conv2d_2 (Conv2D)            (None, 24, 24, 64)        51264    

_________________________________________________________________

activation_2 (Activation)    (None, 24, 24, 64)        0        

_________________________________________________________________

conv2d_3 (Conv2D)            (None, 22, 22, 64)        36928    

_________________________________________________________________

activation_3 (Activation)    (None, 22, 22, 64)        0        

_________________________________________________________________

max_pooling2d_2 (MaxPooling2 (None, 11, 11, 64)        0        

_________________________________________________________________

flatten_1 (Flatten)          (None, 7744)              0        

_________________________________________________________________

dense_1 (Dense)              (None, 50)                387250    

_________________________________________________________________

activation_4 (Activation)    (None, 50)                0        

_________________________________________________________________

dense_2 (Dense)              (None, 6)                 306      

=================================================================

Total params: 476,580

Trainable params: 476,580

Non-trainable params: 0

_________________________________________________________________

None

_________________________________________________________________

Layer (type)                 Output Shape              Param #  

=================================================================

spatial_transformer_1 (Spati (None, 30, 30, 1)         476580    

_________________________________________________________________

conv2d_4 (Conv2D)            (None, 28, 28, 32)        320      

_________________________________________________________________

dropout_1 (Dropout)          (None, 28, 28, 32)        0        

_________________________________________________________________

conv2d_5 (Conv2D)            (None, 26, 26, 64)        18496    

_________________________________________________________________

dropout_2 (Dropout)          (None, 26, 26, 64)        0        

_________________________________________________________________

max_pooling2d_3 (MaxPooling2 (None, 13, 13, 64)        0        

_________________________________________________________________

conv2d_6 (Conv2D)            (None, 11, 11, 64)        36928    

_________________________________________________________________

dropout_3 (Dropout)          (None, 11, 11, 64)        0        

_________________________________________________________________

max_pooling2d_4 (MaxPooling2 (None, 5, 5, 64)          0        

_________________________________________________________________

flatten_2 (Flatten)          (None, 1600)              0        

_________________________________________________________________

dense_3 (Dense)              (None, 256)               409856    

_________________________________________________________________

dropout_4 (Dropout)          (None, 256)               0        

_________________________________________________________________

activation_5 (Activation)    (None, 256)               0        

_________________________________________________________________

dense_4 (Dense)              (None, 10)                2570      

_________________________________________________________________

activation_6 (Activation)    (None, 10)                0        

=================================================================

Total params: 944,750

Trainable params: 944,750

Non-trainable params: 0

_________________________________________________________________

None

Train on 50000 samples, validate on 10000 samples

Epoch 1/30

- 974s - loss: 2.0926 - categorical_accuracy: 0.2345 - val_loss: 1.6258 - val_categorical_accuracy: 0.5949

Epoch 2/30

- 1007s - loss: 1.0926 - categorical_accuracy: 0.6387 - val_loss: 0.7963 - val_categorical_accuracy: 0.8433

Epoch 3/30

- 844s - loss: 0.6038 - categorical_accuracy: 0.8118 - val_loss: 0.4906 - val_categorical_accuracy: 0.8977

Epoch 4/30

- 851s - loss: 0.4351 - categorical_accuracy: 0.8648 - val_loss: 0.3909 - val_categorical_accuracy: 0.9160

Epoch 5/30

- 864s - loss: 0.3483 - categorical_accuracy: 0.8914 - val_loss: 0.3046 - val_categorical_accuracy: 0.9367

Epoch 6/30

- 872s - loss: 0.3158 - categorical_accuracy: 0.9027 - val_loss: 0.2826 - val_categorical_accuracy: 0.9349

Epoch 7/30

- 861s - loss: 0.2772 - categorical_accuracy: 0.9136 - val_loss: 0.3244 - val_categorical_accuracy: 0.9243

Epoch 8/30

- 862s - loss: 0.2414 - categorical_accuracy: 0.9251 - val_loss: 0.2228 - val_categorical_accuracy: 0.9600

Epoch 9/30

- 858s - loss: 0.2278 - categorical_accuracy: 0.9287 - val_loss: 0.2305 - val_categorical_accuracy: 0.9556

Epoch 10/30

- 860s - loss: 0.2150 - categorical_accuracy: 0.9328 - val_loss: 0.2119 - val_categorical_accuracy: 0.9600

Epoch 11/30

- 862s - loss: 0.2130 - categorical_accuracy: 0.9334 - val_loss: 0.1949 - val_categorical_accuracy: 0.9583

Epoch 12/30

- 855s - loss: 0.1917 - categorical_accuracy: 0.9410 - val_loss: 0.1841 - val_categorical_accuracy: 0.9595

Epoch 13/30

- 857s - loss: 0.1891 - categorical_accuracy: 0.9414 - val_loss: 0.2455 - val_categorical_accuracy: 0.9613

Epoch 14/30

- 862s - loss: 0.1865 - categorical_accuracy: 0.9423 - val_loss: 0.2044 - val_categorical_accuracy: 0.9629

Epoch 15/30

- 863s - loss: 0.1789 - categorical_accuracy: 0.9446 - val_loss: 0.2147 - val_categorical_accuracy: 0.9647

Epoch 16/30

- 855s - loss: 0.1708 - categorical_accuracy: 0.9460 - val_loss: 0.1748 - val_categorical_accuracy: 0.9692

Epoch 17/30

- 859s - loss: 0.1615 - categorical_accuracy: 0.9509 - val_loss: 0.1870 - val_categorical_accuracy: 0.9707

Epoch 18/30

- 862s - loss: 0.1538 - categorical_accuracy: 0.9514 - val_loss: 0.1906 - val_categorical_accuracy: 0.9689

Epoch 19/30

- 866s - loss: 0.1494 - categorical_accuracy: 0.9537 - val_loss: 0.1596 - val_categorical_accuracy: 0.9728

Epoch 20/30

- 864s - loss: 0.1490 - categorical_accuracy: 0.9537 - val_loss: 0.1821 - val_categorical_accuracy: 0.9692

Epoch 21/30

- 860s - loss: 0.1517 - categorical_accuracy: 0.9524 - val_loss: 0.1579 - val_categorical_accuracy: 0.9701

Epoch 22/30

- 859s - loss: 0.1506 - categorical_accuracy: 0.9539 - val_loss: 0.1595 - val_categorical_accuracy: 0.9712

Epoch 23/30

- 859s - loss: 0.1407 - categorical_accuracy: 0.9567 - val_loss: 0.1590 - val_categorical_accuracy: 0.9712

Epoch 24/30

- 856s - loss: 0.1361 - categorical_accuracy: 0.9569 - val_loss: 0.2160 - val_categorical_accuracy: 0.9723

Epoch 25/30

- 856s - loss: 0.1348 - categorical_accuracy: 0.9583 - val_loss: 0.1678 - val_categorical_accuracy: 0.9741

Epoch 26/30

- 856s - loss: 0.1298 - categorical_accuracy: 0.9596 - val_loss: 0.1820 - val_categorical_accuracy: 0.9707

Epoch 27/30

- 856s - loss: 0.1317 - categorical_accuracy: 0.9597 - val_loss: 0.1998 - val_categorical_accuracy: 0.9738

Epoch 28/30

- 855s - loss: 0.1325 - categorical_accuracy: 0.9594 - val_loss: 0.1991 - val_categorical_accuracy: 0.9674

Epoch 29/30

- 856s - loss: 0.1230 - categorical_accuracy: 0.9621 - val_loss: 0.1848 - val_categorical_accuracy: 0.9720

Epoch 30/30

- 856s - loss: 0.1246 - categorical_accuracy: 0.9611 - val_loss: 0.1754 - val_categorical_accuracy: 0.9755

  32/10000 [..............................] - ETA: 59s

  64/10000 [..............................] - ETA: 59s

  96/10000 [..............................] - ETA: 59s

 128/10000 [..............................] - ETA: 57s

 160/10000 [..............................] - ETA: 56s

 192/10000 [..............................] - ETA: 55s

 224/10000 [..............................] - ETA: 55s

 256/10000 [..............................] - ETA: 54s

 288/10000 [..............................] - ETA: 54s

 320/10000 [..............................] - ETA: 54s

 352/10000 [>.............................] - ETA: 53s

 384/10000 [>.............................] - ETA: 53s

 416/10000 [>.............................] - ETA: 53s

 448/10000 [>.............................] - ETA: 52s

 480/10000 [>.............................] - ETA: 52s

 512/10000 [>.............................] - ETA: 52s

 544/10000 [>.............................] - ETA: 52s

 576/10000 [>.............................] - ETA: 52s

 608/10000 [>.............................] - ETA: 52s

 640/10000 [>.............................] - ETA: 52s

 672/10000 [=>............................] - ETA: 51s

 704/10000 [=>............................] - ETA: 51s

 736/10000 [=>............................] - ETA: 51s

 768/10000 [=>............................] - ETA: 51s

 800/10000 [=>............................] - ETA: 51s

 832/10000 [=>............................] - ETA: 50s

 864/10000 [=>............................] - ETA: 50s

 896/10000 [=>............................] - ETA: 50s

 928/10000 [=>............................] - ETA: 50s

 960/10000 [=>............................] - ETA: 50s

 992/10000 [=>............................] - ETA: 49s

1024/10000 [==>...........................] - ETA: 49s

1056/10000 [==>...........................] - ETA: 49s

1088/10000 [==>...........................] - ETA: 49s

1120/10000 [==>...........................] - ETA: 49s

1152/10000 [==>...........................] - ETA: 49s

1184/10000 [==>...........................] - ETA: 49s

1216/10000 [==>...........................] - ETA: 48s

1248/10000 [==>...........................] - ETA: 48s

1280/10000 [==>...........................] - ETA: 48s

1312/10000 [==>...........................] - ETA: 48s

1344/10000 [===>..........................] - ETA: 48s

1376/10000 [===>..........................] - ETA: 47s

1408/10000 [===>..........................] - ETA: 47s

1440/10000 [===>..........................] - ETA: 47s

1472/10000 [===>..........................] - ETA: 47s

1504/10000 [===>..........................] - ETA: 47s

1536/10000 [===>..........................] - ETA: 46s

1568/10000 [===>..........................] - ETA: 46s

1600/10000 [===>..........................] - ETA: 46s

1632/10000 [===>..........................] - ETA: 46s

1664/10000 [===>..........................] - ETA: 46s

1696/10000 [====>.........................] - ETA: 46s

1728/10000 [====>.........................] - ETA: 46s

1760/10000 [====>.........................] - ETA: 46s

1792/10000 [====>.........................] - ETA: 46s

1824/10000 [====>.........................] - ETA: 45s

1856/10000 [====>.........................] - ETA: 45s

1888/10000 [====>.........................] - ETA: 45s

1920/10000 [====>.........................] - ETA: 45s

1952/10000 [====>.........................] - ETA: 45s

1984/10000 [====>.........................] - ETA: 45s

2016/10000 [=====>........................] - ETA: 44s

2048/10000 [=====>........................] - ETA: 44s

2080/10000 [=====>........................] - ETA: 44s

2112/10000 [=====>........................] - ETA: 44s

2144/10000 [=====>........................] - ETA: 44s

2176/10000 [=====>........................] - ETA: 44s

2208/10000 [=====>........................] - ETA: 44s

2240/10000 [=====>........................] - ETA: 43s

2272/10000 [=====>........................] - ETA: 43s

2304/10000 [=====>........................] - ETA: 43s

2336/10000 [======>.......................] - ETA: 43s

2368/10000 [======>.......................] - ETA: 43s

2400/10000 [======>.......................] - ETA: 43s

2432/10000 [======>.......................] - ETA: 42s

2464/10000 [======>.......................] - ETA: 42s

2496/10000 [======>.......................] - ETA: 42s

2528/10000 [======>.......................] - ETA: 42s

2560/10000 [======>.......................] - ETA: 42s

2592/10000 [======>.......................] - ETA: 41s

2624/10000 [======>.......................] - ETA: 41s

2656/10000 [======>.......................] - ETA: 41s

2688/10000 [=======>......................] - ETA: 41s

2720/10000 [=======>......................] - ETA: 41s

2752/10000 [=======>......................] - ETA: 41s

2784/10000 [=======>......................] - ETA: 40s

2816/10000 [=======>......................] - ETA: 40s

2848/10000 [=======>......................] - ETA: 40s

2880/10000 [=======>......................] - ETA: 40s

2912/10000 [=======>......................] - ETA: 40s

2944/10000 [=======>......................] - ETA: 39s

2976/10000 [=======>......................] - ETA: 39s

3008/10000 [========>.....................] - ETA: 39s

3040/10000 [========>.....................] - ETA: 39s

3072/10000 [========>.....................] - ETA: 39s

3104/10000 [========>.....................] - ETA: 39s

3136/10000 [========>.....................] - ETA: 38s

3168/10000 [========>.....................] - ETA: 38s

3200/10000 [========>.....................] - ETA: 38s

3232/10000 [========>.....................] - ETA: 38s

3264/10000 [========>.....................] - ETA: 38s

3296/10000 [========>.....................] - ETA: 37s

3328/10000 [========>.....................] - ETA: 37s

3360/10000 [=========>....................] - ETA: 37s

3392/10000 [=========>....................] - ETA: 37s

3424/10000 [=========>....................] - ETA: 37s

3456/10000 [=========>....................] - ETA: 36s

3488/10000 [=========>....................] - ETA: 36s

3520/10000 [=========>....................] - ETA: 36s

3552/10000 [=========>....................] - ETA: 36s

3584/10000 [=========>....................] - ETA: 36s

3616/10000 [=========>....................] - ETA: 36s

3648/10000 [=========>....................] - ETA: 35s

3680/10000 [==========>...................] - ETA: 35s

3712/10000 [==========>...................] - ETA: 35s

3744/10000 [==========>...................] - ETA: 35s

3776/10000 [==========>...................] - ETA: 35s

3808/10000 [==========>...................] - ETA: 34s

3840/10000 [==========>...................] - ETA: 34s

3872/10000 [==========>...................] - ETA: 34s

3904/10000 [==========>...................] - ETA: 34s

3936/10000 [==========>...................] - ETA: 34s

3968/10000 [==========>...................] - ETA: 33s

4000/10000 [===========>..................] - ETA: 33s

4032/10000 [===========>..................] - ETA: 33s

4064/10000 [===========>..................] - ETA: 33s

4096/10000 [===========>..................] - ETA: 33s

4128/10000 [===========>..................] - ETA: 33s

4160/10000 [===========>..................] - ETA: 32s

4192/10000 [===========>..................] - ETA: 32s

4224/10000 [===========>..................] - ETA: 32s

4256/10000 [===========>..................] - ETA: 32s

4288/10000 [===========>..................] - ETA: 32s

4320/10000 [===========>..................] - ETA: 31s

4352/10000 [============>.................] - ETA: 31s

4384/10000 [============>.................] - ETA: 31s

4416/10000 [============>.................] - ETA: 31s

4448/10000 [============>.................] - ETA: 31s

4480/10000 [============>.................] - ETA: 31s

4512/10000 [============>.................] - ETA: 30s

4544/10000 [============>.................] - ETA: 30s

4576/10000 [============>.................] - ETA: 30s

4608/10000 [============>.................] - ETA: 30s

4640/10000 [============>.................] - ETA: 30s

4672/10000 [=============>................] - ETA: 29s

4704/10000 [=============>................] - ETA: 29s

4736/10000 [=============>................] - ETA: 29s

4768/10000 [=============>................] - ETA: 29s

4800/10000 [=============>................] - ETA: 29s

4832/10000 [=============>................] - ETA: 29s

4864/10000 [=============>................] - ETA: 28s

4896/10000 [=============>................] - ETA: 28s

4928/10000 [=============>................] - ETA: 28s

4960/10000 [=============>................] - ETA: 28s

4992/10000 [=============>................] - ETA: 28s

5024/10000 [==============>...............] - ETA: 27s

5056/10000 [==============>...............] - ETA: 27s

5088/10000 [==============>...............] - ETA: 27s

5120/10000 [==============>...............] - ETA: 27s

5152/10000 [==============>...............] - ETA: 27s

5184/10000 [==============>...............] - ETA: 27s

5216/10000 [==============>...............] - ETA: 26s

5248/10000 [==============>...............] - ETA: 26s

5280/10000 [==============>...............] - ETA: 26s

5312/10000 [==============>...............] - ETA: 26s

5344/10000 [===============>..............] - ETA: 26s

5376/10000 [===============>..............] - ETA: 25s

5408/10000 [===============>..............] - ETA: 25s

5440/10000 [===============>..............] - ETA: 25s

5472/10000 [===============>..............] - ETA: 25s

5504/10000 [===============>..............] - ETA: 25s

5536/10000 [===============>..............] - ETA: 25s

5568/10000 [===============>..............] - ETA: 24s

5600/10000 [===============>..............] - ETA: 24s

5632/10000 [===============>..............] - ETA: 24s

5664/10000 [===============>..............] - ETA: 24s

5696/10000 [================>.............] - ETA: 24s

5728/10000 [================>.............] - ETA: 23s

5760/10000 [================>.............] - ETA: 23s

5792/10000 [================>.............] - ETA: 23s

5824/10000 [================>.............] - ETA: 23s

5856/10000 [================>.............] - ETA: 23s

5888/10000 [================>.............] - ETA: 23s

5920/10000 [================>.............] - ETA: 22s

5952/10000 [================>.............] - ETA: 22s

5984/10000 [================>.............] - ETA: 22s

6016/10000 [=================>............] - ETA: 22s

6048/10000 [=================>............] - ETA: 22s

6080/10000 [=================>............] - ETA: 21s

6112/10000 [=================>............] - ETA: 21s

6144/10000 [=================>............] - ETA: 21s

6176/10000 [=================>............] - ETA: 21s

6208/10000 [=================>............] - ETA: 21s

6240/10000 [=================>............] - ETA: 21s

6272/10000 [=================>............] - ETA: 20s

6304/10000 [=================>............] - ETA: 20s

6336/10000 [==================>...........] - ETA: 20s

6368/10000 [==================>...........] - ETA: 20s

6400/10000 [==================>...........] - ETA: 20s

6432/10000 [==================>...........] - ETA: 19s

6464/10000 [==================>...........] - ETA: 19s

6496/10000 [==================>...........] - ETA: 19s

6528/10000 [==================>...........] - ETA: 19s

6560/10000 [==================>...........] - ETA: 19s

6592/10000 [==================>...........] - ETA: 19s

6624/10000 [==================>...........] - ETA: 18s

6656/10000 [==================>...........] - ETA: 18s

6688/10000 [===================>..........] - ETA: 18s

6720/10000 [===================>..........] - ETA: 18s

6752/10000 [===================>..........] - ETA: 18s

6784/10000 [===================>..........] - ETA: 17s

6816/10000 [===================>..........] - ETA: 17s

6848/10000 [===================>..........] - ETA: 17s

6880/10000 [===================>..........] - ETA: 17s

6912/10000 [===================>..........] - ETA: 17s

6944/10000 [===================>..........] - ETA: 17s

6976/10000 [===================>..........] - ETA: 16s

7008/10000 [====================>.........] - ETA: 16s

7040/10000 [====================>.........] - ETA: 16s

7072/10000 [====================>.........] - ETA: 16s

7104/10000 [====================>.........] - ETA: 16s

7136/10000 [====================>.........] - ETA: 16s

7168/10000 [====================>.........] - ETA: 15s

7200/10000 [====================>.........] - ETA: 15s

7232/10000 [====================>.........] - ETA: 15s

7264/10000 [====================>.........] - ETA: 15s

7296/10000 [====================>.........] - ETA: 15s

7328/10000 [====================>.........] - ETA: 14s

7360/10000 [=====================>........] - ETA: 14s

7392/10000 [=====================>........] - ETA: 14s

7424/10000 [=====================>........] - ETA: 14s

7456/10000 [=====================>........] - ETA: 14s

7488/10000 [=====================>........] - ETA: 14s

7520/10000 [=====================>........] - ETA: 13s

7552/10000 [=====================>........] - ETA: 13s

7584/10000 [=====================>........] - ETA: 13s

7616/10000 [=====================>........] - ETA: 13s

7648/10000 [=====================>........] - ETA: 13s

7680/10000 [======================>.......] - ETA: 13s

7712/10000 [======================>.......] - ETA: 12s

7744/10000 [======================>.......] - ETA: 12s

7776/10000 [======================>.......] - ETA: 12s

7808/10000 [======================>.......] - ETA: 12s

7840/10000 [======================>.......] - ETA: 12s

7872/10000 [======================>.......] - ETA: 11s

7904/10000 [======================>.......] - ETA: 11s

7936/10000 [======================>.......] - ETA: 11s

7968/10000 [======================>.......] - ETA: 11s

8000/10000 [=======================>......] - ETA: 11s

8032/10000 [=======================>......] - ETA: 11s

8064/10000 [=======================>......] - ETA: 10s

8096/10000 [=======================>......] - ETA: 10s

8128/10000 [=======================>......] - ETA: 10s

8160/10000 [=======================>......] - ETA: 10s

8192/10000 [=======================>......] - ETA: 10s

8224/10000 [=======================>......] - ETA: 9s

8256/10000 [=======================>......] - ETA: 9s

8288/10000 [=======================>......] - ETA: 9s

8320/10000 [=======================>......] - ETA: 9s

8352/10000 [========================>.....] - ETA: 9s

8384/10000 [========================>.....] - ETA: 9s

8416/10000 [========================>.....] - ETA: 8s

8448/10000 [========================>.....] - ETA: 8s

8480/10000 [========================>.....] - ETA: 8s

8512/10000 [========================>.....] - ETA: 8s

8544/10000 [========================>.....] - ETA: 8s

8576/10000 [========================>.....] - ETA: 7s

8608/10000 [========================>.....] - ETA: 7s

8640/10000 [========================>.....] - ETA: 7s

8672/10000 [=========================>....] - ETA: 7s

8704/10000 [=========================>....] - ETA: 7s

8736/10000 [=========================>....] - ETA: 7s

8768/10000 [=========================>....] - ETA: 6s

8800/10000 [=========================>....] - ETA: 6s

8832/10000 [=========================>....] - ETA: 6s

8864/10000 [=========================>....] - ETA: 6s

8896/10000 [=========================>....] - ETA: 6s

8928/10000 [=========================>....] - ETA: 6s

8960/10000 [=========================>....] - ETA: 5s

8992/10000 [=========================>....] - ETA: 5s

9024/10000 [==========================>...] - ETA: 5s

9056/10000 [==========================>...] - ETA: 5s

9088/10000 [==========================>...] - ETA: 5s

9120/10000 [==========================>...] - ETA: 4s

9152/10000 [==========================>...] - ETA: 4s

9184/10000 [==========================>...] - ETA: 4s

9216/10000 [==========================>...] - ETA: 4s

9248/10000 [==========================>...] - ETA: 4s

9280/10000 [==========================>...] - ETA: 4s

9312/10000 [==========================>...] - ETA: 3s

9344/10000 [===========================>..] - ETA: 3s

9376/10000 [===========================>..] - ETA: 3s

9408/10000 [===========================>..] - ETA: 3s

9440/10000 [===========================>..] - ETA: 3s

9472/10000 [===========================>..] - ETA: 2s

9504/10000 [===========================>..] - ETA: 2s

9536/10000 [===========================>..] - ETA: 2s

9568/10000 [===========================>..] - ETA: 2s

9600/10000 [===========================>..] - ETA: 2s

9632/10000 [===========================>..] - ETA: 2s

9664/10000 [===========================>..] - ETA: 1s

9696/10000 [============================>.] - ETA: 1s

9728/10000 [============================>.] - ETA: 1s

9760/10000 [============================>.] - ETA: 1s

9792/10000 [============================>.] - ETA: 1s

9824/10000 [============================>.] - ETA: 0s

9856/10000 [============================>.] - ETA: 0s

9888/10000 [============================>.] - ETA: 0s

9920/10000 [============================>.] - ETA: 0s

9952/10000 [============================>.] - ETA: 0s

9984/10000 [============================>.] - ETA: 0s

10000/10000 [==============================] - 56s 6ms/step





相关文章
|
6月前
|
机器学习/深度学习 编解码 PyTorch
Pytorch实现手写数字识别 | MNIST数据集(CNN卷积神经网络)
Pytorch实现手写数字识别 | MNIST数据集(CNN卷积神经网络)
|
26天前
|
算法 搜索推荐 Java
java 后端 使用 Graphics2D 制作海报,画echarts图,带工具类,各种细节:如头像切割成圆形,文字换行算法(完美实验success),解决画上文字、图片后不清晰问题
这篇文章介绍了如何使用Java后端技术,结合Graphics2D和Echarts等工具,生成包含个性化信息和图表的海报,并提供了详细的代码实现和GitHub项目链接。
91 0
java 后端 使用 Graphics2D 制作海报,画echarts图,带工具类,各种细节:如头像切割成圆形,文字换行算法(完美实验success),解决画上文字、图片后不清晰问题
|
26天前
|
算法 Java Linux
java制作海报一:java使用Graphics2D 在图片上写字,文字换行算法详解
这篇文章介绍了如何在Java中使用Graphics2D在图片上绘制文字,并实现自动换行的功能。
66 0
|
2月前
|
机器学习/深度学习 数据采集 数据可视化
深度学习实践:构建并训练卷积神经网络(CNN)对CIFAR-10数据集进行分类
本文详细介绍如何使用PyTorch构建并训练卷积神经网络(CNN)对CIFAR-10数据集进行图像分类。从数据预处理、模型定义到训练过程及结果可视化,文章全面展示了深度学习项目的全流程。通过实际操作,读者可以深入了解CNN在图像分类任务中的应用,并掌握PyTorch的基本使用方法。希望本文为您的深度学习项目提供有价值的参考与启示。
|
4月前
|
机器学习/深度学习 人工智能 自然语言处理
算法金 | 秒懂 AI - 深度学习五大模型:RNN、CNN、Transformer、BERT、GPT 简介
**RNN**,1986年提出,用于序列数据,如语言模型和语音识别,但原始模型有梯度消失问题。**LSTM**和**GRU**通过门控解决了此问题。 **CNN**,1989年引入,擅长图像处理,卷积层和池化层提取特征,经典应用包括图像分类和物体检测,如LeNet-5。 **Transformer**,2017年由Google推出,自注意力机制实现并行计算,优化了NLP效率,如机器翻译。 **BERT**,2018年Google的双向预训练模型,通过掩码语言模型改进上下文理解,适用于问答和文本分类。
153 9
|
4月前
|
文字识别 算法 Java
文本,保存图片09,一个可以用id作为图片名字的pom插件,利用雪花算法生成唯一的id
文本,保存图片09,一个可以用id作为图片名字的pom插件,利用雪花算法生成唯一的id
|
6月前
|
算法
MATLAB|【免费】融合正余弦和柯西变异的麻雀优化算法SCSSA-CNN-BiLSTM双向长短期记忆网络预测模型
这段内容介绍了一个使用改进的麻雀搜索算法优化CNN-BiLSTM模型进行多输入单输出预测的程序。程序通过融合正余弦和柯西变异提升算法性能,主要优化学习率、正则化参数及BiLSTM的隐层神经元数量。它利用一段简单的风速数据进行演示,对比了改进算法与粒子群、灰狼算法的优化效果。代码包括数据导入、预处理和模型构建部分,并展示了优化前后的效果。建议使用高版本MATLAB运行。
|
6月前
|
机器学习/深度学习 TensorFlow 算法框架/工具
【Python深度学习】Tensorflow+CNN进行人脸识别实战(附源码和数据集)
【Python深度学习】Tensorflow+CNN进行人脸识别实战(附源码和数据集)
652 4
|
6月前
|
JavaScript 算法 前端开发
JS懒加载 -- 适用于商城主页商品懒加载、图片懒加载,算法简单、易于理解、萌新福音
JS懒加载 -- 适用于商城主页商品懒加载、图片懒加载,算法简单、易于理解、萌新福音
55 0
|
27天前
|
机器学习/深度学习 人工智能 算法框架/工具
深度学习中的卷积神经网络(CNN)及其在图像识别中的应用
【10月更文挑战第7天】本文将深入探讨卷积神经网络(CNN)的基本原理,以及它如何在图像识别领域中大放异彩。我们将从CNN的核心组件出发,逐步解析其工作原理,并通过一个实际的代码示例,展示如何利用Python和深度学习框架实现一个简单的图像分类模型。文章旨在为初学者提供一个清晰的入门路径,同时为有经验的开发者提供一些深入理解的视角。