Question: 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 filters with a kernel size of x 'relu' activation and x pixels, grayscale as input images size.
First Pooling Layer: Uses max pooling with a pool size of x and a stride of
Second Convolutional Layer: Uses filters with a kernel size of x 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 D array.
First Dense Layer: Has units with 'relu' activation.
Second Dense Layer: Has units with 'relu' activation.
Third Dense Layer: Has units with 'softmax' activation.
The network should be compiled using Adam optimizer, categoricalcrossentropy loss function and accuracy as a metric. from warnings import filters
import keras
from keras.models import Sequential
from keras.layers import ConvD MaxPoolingD Flatten, Dense
from tensorflow import keras
# Function : Build the model
def createmodel:
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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
