Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the following line of code used to build a Convolutional Neural Network model, choose the correct pairing. X _ train = X _ train.reshape

For the following line of code used to build a Convolutional Neural Network model, choose the correct pairing.
X_train = X_train.reshape((X_train.shape[0],28,28,1))
X_train = X_train.astype('float32')/255.0
y_train_encoded = tf.keras.utils.to_categorical(y_train)
model = Sequential()
model.add(Conv2D(64,(3,3), activation='relu', padding="same", input_shape=(28,28,1)))
model.add(MaxPooling2D((2,2), padding = 'same'))
model.add(Flatten())
model.add(Dense(100, activation='relu'))
model.add(Dense(10, activation='softmax'))
A
X_train = X_train.astype('float32')/255.0
i adding an output layer to the model
B
model.add(Conv2D(64,(3,3), activation='relu', padding="same", input_shape=(28,28,1)))
ii Adds max-pooling layer
C
model.add(MaxPooling2D((2,2), padding = 'same'))
iii Adds a convolutional layer
D
model.add(Dense(10, activation='softmax'))
iv
Normalizes the data in the X_train array by scaling

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

Students also viewed these Databases questions