CNN model on Iris images

CNN model on Iris images

Convolutional Neural Networks, like neural networks, are made up of neurons with learnable weights and biases. Each neuron receives several inputs, takes a weighted sum over them, passes it through an activation function and responds with an output.
The whole network has a loss function and all the tips and tricks that we developed for neural networks still apply on Convolutional Neural Networks.
Let’s train a network to classify images from the iris image dataset using a Convolution Neural Network built-in TensorFlow.
Dataset:
Now unzip the dataset in colab:
                                                                              

The dataset divided into three folders as Setosa, Versicolor, and Virginia( below image):
                                                                                                
Importing Libraries:
                               

Plotting Images randomly from any folder:


Tensor image data with real-time data augmentation:
                                           
Train data and Validation Data creation:
                                                

Model Building:
                                           
Model Summary :
                                          

Fitting the Model:
            

Confusion Matrix:
                                                      
                                                      

Future improvements :

    • Related Articles

    • Cross Validation and different types of splitting techniques

      In machine learning, we couldn’t fit the model on the training data and can’t say that the model will work accurately for the real data. For this, we must assure that our model got the correct patterns from the data, and it is not getting up too much ...