Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

given the following definition of a convolutional neural network ( comments about each line of Python code highlighted in yellow before the line ) ,

given the following definition of a convolutional neural network (comments about each line of Python code highlighted in yellow before the line),
model = Sequential()
#input as a (1x28x28) tensor, 24(3x3) kernels, stride=1, padding="same" to keep input size, relu activation
model.add(Conv2D (24, kernel_size=(3,3), padding="same", activation="relu", input_shape=(28,28,1))
# max pooling with pooling size (2x2) applied as in the lecture's example
model.add(MaxPooling2D (pool_size=(2,2)))
#input as previous layer's feature maps, no padded convolution here
model.add(Conv2D (48, kernel_size=(3,3), padding="valid", activation="relu"))
# max pooling with pooling size (2x2) applied as in the lecture's example
model.add(MaxPooling2D (pool_size=(2,2)))
# input as previous layer's feature maps, see description in the first layer for the rest
model.add(Conv2D (64, kernel_size=(3,3), padding="same", activation="relu"))
#max pooling with pooling size (2x2) applied as in the lecture's example
model.add(MaxPooling2D (pool_size=(2,2)))
#input as previous layer's feature maps, no impact on the number of the network's parameters model.add(Flatten())
# 128-wide dense layer with input as flattened vector from previous step
model.add(Dense (128, activation="relu"))
# no impact on the number of the network's parameters
model.add(Dropout (0.25))
# 10-wide output layer with input as hidden vector from previous step
model.add(Dense (10, activation="softmax"))
# no impact on the number of the network's parameters
model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
describe the network in terms of its depth, its layers' width, what it is expected to eventually calculate and say how many parameters are trainable in total elaborating on how you calculate that number.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 22nd International Conference Dexa 2011 Toulouse France August/September 2011 Proceedings Part 1 Lncs 6860

Authors: Abdelkader Hameurlain ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2011th Edition

3642230873, 978-3642230875

More Books

Students also viewed these Databases questions