Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Iteration 3 – CNN parameter adjustment

The second convolution layer was dropped completely; the input layer was changed from 5 x 5 to 3 x 3:

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

The third convolution layer remains unchanged. This layer is as follows:

model.add(Conv2D(128, (3, 3), activation='relu'))model.add(AveragePooling2D(pool_size=(3,3), strides=(2, 2)))

There is no change in the dense layer. The output of this is as follows:

Epoch 1/5 256/256 [==========================] - 410s 2s/step - loss: 1.6465 - acc: 0.3500 Epoch 2/5 256/256 [==========================] - 415s 2s/step - loss: 1.3435 - acc: 0.4851 Epoch 3/5 256/256 [==========================] - 412s 2s/step - loss: 1.0837 - acc: 0.5938 Epoch ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content