Deep Learning by Ian Goodfellow, Yoshua Bengio and Aaron Courville

Great Book !! Well organised, Concise and Complete !!This book summarises the vast and complex topic of deep learning in a textbook, by some of the leaders in the field.What has been most valuable is, seeing how it all fits together.There are lots of books, blogs, and videos out there, but this is one of … Continue reading Deep Learning by Ian Goodfellow, Yoshua Bengio and Aaron Courville

Difference Between Batch, Mini-Batch and Stochastic Gradient Descent

Gradient Descent is one the key algorithm used in Machine Learning. While training machine learning model, we require an algorithm to minimize the value of loss function. Gradient Descent is one of the optimization algorithm , that is used to minimize the loss. There are mainly three types of Gradient Descent algorithm1. Batch Gradient DescentBatch … Continue reading Difference Between Batch, Mini-Batch and Stochastic Gradient Descent

How to write command-line arguments using argparse in python

If you want to run a .py python file from command line and you also want to pass the argument using command line you can use argparse library. This can be done as below: import argparse # Command Line arguments argp = argparse.ArgumentParser() argp.add_argument('--my_var', dest="my_var", action="store", type=int, default=5) params = argp.parse_args() myvar= params.my_var print(myvar) Then … Continue reading How to write command-line arguments using argparse in python

Decision Tree vs Linear Regression

Decision Tree can be used for implementing regression as well as classification models, however , Linear Regression can be used for regression problem only. Decision tree can be used for regression, even when there is non linear relationships between the features and the output variable.¬†However, Linear Regression works really nicely when there is linear relationship … Continue reading Decision Tree vs Linear Regression

Using torchvision transforms for data augmentation

Transforms are common image transformations. torchvision transforms are used to augment the data with scaling, rotations, mirroring, cropping etc. Transforms are common image transformations.  Let us create some possible transforms like RandomRotation , Resize, RandomResizedCrop etc. Below is the code to use transforms for the training, validation, and testing sets transforms.Compose([transforms.Resize(224),transforms.CenterCrop(64),transforms.ToTensor()]) Most neural networks expect the … Continue reading Using torchvision transforms for data augmentation