0% found this document useful (0 votes)
16 views2 pages

CNN On Original Steps

mndaj

Uploaded by

nidhi kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

CNN On Original Steps

mndaj

Uploaded by

nidhi kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CNN on original steps

27 October 2024 14:09

The algorithm used in the model is a Convolutional Neural Network (CNN), which is particularly
effective for image classification tasks. :

#Convolutional Neural Network (CNN)


1. Convolutional Layers:
- These layers apply a series of filters to the input image, allowing the model to learn various
features, such as edges, textures, and shapes.
- In your model, we have three convolutional layers:
- The first layer detects simple features (like edges).
- Subsequent layers detect more complex features by combining the outputs of the previous
layers.

2. Activation Function:
- Each convolutional layer uses the ReLU (Rectified Linear Unit) activation function, which helps
introduce non-linearity into the model. This allows the network to learn more complex patterns.

3. Pooling Layers:
- MaxPooling2D layers reduce the spatial dimensions of the feature maps. This helps to:
- Down-sample the feature maps, reducing the number of parameters and computation in the
network.
- Prevent overfitting by making the model more robust to small variations in the input images.
- Your model uses max pooling after each convolutional layer.

4. Flatten Layer:
- The Flatten layer converts the 2D feature maps from the last pooling layer into a 1D feature
vector. This prepares the data for the fully connected layers.

5. Fully Connected Layers:


- The model has a Dense layer with 128 units, followed by another Dense layer with 4 units (one
for each class) at the end.
- The last layer uses the softmax activation function to output probabilities for each of the four
classes, allowing the model to predict the likelihood of the input image belonging to each class.

# Summary of the Model Architecture


model architecture:

- Input Layer: Accepts images of size 150x150x3 (RGB images).


- Convolutional Layers:
- 1st Convolutional Layer (32 filters, 3x3 kernel)
- 2nd Convolutional Layer (64 filters, 3x3 kernel)
- 3rd Convolutional Layer (128 filters, 3x3 kernel)
- Max Pooling Layers: After each convolutional layer.
- Flatten Layer: Converts 2D outputs into a 1D vector.
- Dense Layers:
- 1 hidden layer with 128 neurons (ReLU activation)
- Output layer with 4 neurons (softmax activation for multi-class classification)

# Training the Model

Research Page 1
During training, the model learns to minimize the categorical cross-entropy loss, which measures
how well the predicted probabilities match the actual class labels. The optimizer used is Adam,
which adapts the learning rate during training for faster convergence.

# Why CNN?
CNNs are especially suited for image classification tasks because they can automatically learn the
relevant features from the images without requiring manual feature extraction. This ability to learn
spatial hierarchies of features makes CNNs very powerful for tasks involving visual data.

Research Page 2

You might also like