Skip to content

binary image classification with cnn #886

Answered by Mattral
eishwezin20 asked this question in Q&A
Discussion options

You must be logged in to vote

there is a duplication of the Convolution2D layer with the same parameters in your model architecture. You should have a different set of layers for building a convolutional neural network (CNN) properly. Here's a revised version of your model:
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense


# Create a Sequential model
classifier = Sequential()

# Add the first convolutional layer
classifier.add(Conv2D(32, (3, 3), input_shape=(175, 130, 3), activation='relu'))
classifier.add(MaxPooling2D(pool_size=(2, 2)))

# Add the second convolutional layer
classifier.add(Conv2D(64, (3, 3), activation='relu'))
classifier.add(MaxPo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eishwezin20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants