Posts

A Comprehensive Guide to Convolutional Neural Networks

Image
  A Comprehensive Guide to Convolutional Neural Networks  Artificial Intelligence has been witnessing a monumental growth in bridging the gap between the capabilities of humans and machines. Researchers and enthusiasts alike, work on numerous aspects of the field to make amazing things happen. One of many such areas is the domain of Computer Vision. The agenda for this field is to enable machines to view the world as humans do, perceive it in a similar manner and even use the knowledge for a multitude of tasks such as Image & Video recognition, Image Analysis & Classification, Media Recreation, Recommendation Systems, Natural Language Processing, etc. The advancements in Computer Vision with Deep Learning has been constructed and perfected with time, primarily over one particular algorithm — a  Convolutional Neural Network . Introduction A CNN sequence to classify handwritten digits A  Convolutional Neural Network (ConvNet/CNN)  is a Deep Learning algori...

Understanding different Loss Functions for Neural Networks

Image
  Understanding different Loss Functions for Neural Networks Image by  KotaFeja The  Loss   Function  is one of the important components of Neural Networks.  Loss  is nothing but a prediction error of Neural Net. And the method to calculate the loss is called Loss Function. In simple words, the Loss is used to calculate the gradients. And gradients are used to update the weights of the Neural Net. This is how a Neural Net is trained. Keras  and  Tensorflow  have various inbuilt loss functions for different objectives. In this guide, I will be covering the following essential loss functions, which could be used for most of the objectives. Mean Squared Error (MSE) Binary Crossentropy (BCE) Categorical Crossentropy (CC) Sparse Categorical Crossentropy (SCC) Mean Squared Error MSE  loss is used for regression tasks. As the name suggests, this loss is calculated by taking the mean of squared differences between actual(target) and predict...

Optimization Algorithms in Neural Networks

Image
  Optimization Algorithms in Neural  Networks This article presents an overview of some of the most used optimizers while training a neural network. Introduction   In deep learning, we have the concept of loss, which tells us how poorly the model is performing at that current instant. Now we need to use this loss to  train  our network such that it performs better. Essentially what we need to do is to take the loss and try to  minimize  it, because a lower loss means our model is going to perform better. The process of minimizing (or maximizing) any mathematical expression is called  optimization. Optimizers are algorithms or methods used to change the attributes of the neural network such as  weights  and  learning rate  to reduce the losses. Optimizers are used to solve optimization problems by minimizing the function.  How do Optimizers work?  For a useful mental model, you can think of a hiker trying to get down a...