Lets understand how to identify the type of flower based on the given input data using Neural Networks. Below are the 3 types of flowers named as: iris setosa iris versicolor iris virginica and each flower have a different area called as petal and sepal, our ML need to predict the flower type based on this data if we provide an unseen data to our ML model once training is done(during testing phase). Feature values that we are considering were : Petal length Petal width Sepal length Sepal width Problem statement : Based on above features, ML model should predict whether the given data belongs to any one of above flower. Before digging into building/programming above neural network we need to understand about one of the important python library called sklearn . Scikit-learn : Scikit-learn is one of the famous machine learning libraries in Python. It is build for Machine ...
After discussing about the fundamentals of Neural Networks and Deep Learning, we have arrived to an exciting stage where we can learn how we program a Neural Network. I have created some simple programs to get some basic idea on how to program a Neural Network and I have used a Python library called PyTorch to program it. Program 1 : Calculate total numbers of parameters in a neural network Points to remember : We need to import nn submodule from main module torch We need to inherit the Module class available in torch.nn submodule We should use self otherwise method doesn't get class objects data Do not confuse about forward(), we don't call it directly, it will be called via constructor in super class. Hence using self. p.numel() return the elements in the Model. Please see my explanation in the downloaded code Need basics of Oops concepts in Python # importing modules torch, nn(neural network): nn is a sub module in main module torch import torch import torch.nn as nn...