Assume that tensorflow has already been imported as tf. Writ…

Written by Anonymous on August 2, 2026 in Uncategorized with no comments.

Questions

Assume thаt tensоrflоw hаs аlready been impоrted as tf. Write a Python function named create_cnn_model() that returns a convolutional neural network for binary classification with the following architecture: An input layer for images with shape (28, 28, 1). A convolutional layer with 32 filters, a 3 × 3 kernel, and tanh activation. A max pooling layer with pool size 2 × 2. A flattening layer. A fully connected hidden layer with 16 neurons and ReLU activation. An output layer with 1 neuron and sigmoid activation.

Comments are closed.