Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Build an convolutional neural network,the function should return model with the following specifications: First Convolutional Layer: Uses 6 filters with a kernel size of 5

Build an convolutional neural network,the function should return model with the following specifications:
First Convolutional Layer: Uses 6 filters with a kernel size of 5x5, 'relu' activation and 28x28 pixels, grayscale as input images size.
First Pooling Layer: Uses max pooling with a pool size of 2x2 and a stride of 2.
Second Convolutional Layer: Uses 16 filters with a kernel size of 5x5 and 'relu' activation.
Second Pooling Layer: Uses max pooling with the same specifications as the first pooling layer.
Flattening Layer: Converts the feature map to a 1D array.
First Dense Layer: Has 120 units with 'relu' activation.
Second Dense Layer: Has 84 units with 'relu' activation.
Third Dense Layer: Has 10 units with 'softmax' activation.
The network should be compiled using Adam optimizer, categorical_crossentropy loss function and accuracy as a metric. from warnings import filters
import keras
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
from tensorflow import keras
# Function 1: Build the model
def create_model():
'''
output: A compile CNN model with the specifications listed in the question
'''
### BEGIN SOLUTION
return model

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_2

Step: 3

blur-text-image_3

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

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students explore these related Databases questions

Question

Design a health and safety policy.

Answered: 3 weeks ago