The traditional model of neural network is called multilayer perceptrons. They are usually made up of a series of interconnected layers. The input layer is where the data enters the network, and the output layer is where the network delivers the output. The input layer is usually connected to one or more hidden layers, which […]
Archive | Deep Learning with PyTorch
Building a Single Layer Neural Network in PyTorch
A neural network is a set of neuron nodes that are interconnected with one another. The neurons are not just connected to their adjacent neurons but also to the ones that are farther away. The main idea behind neural networks is that every neuron in a layer has one or more input values, and they […]
Building a Softmax Classifier for Images in PyTorch
Softmax classifier is a type of classifier in supervised learning. It is an important building block in deep learning networks and the most popular choice among deep learning practitioners. Softmax classifier is suitable for multiclass classification, which outputs the probability for each of the classes. This tutorial will teach you how to build a softmax […]
Introduction to Softmax Classifier in PyTorch
While a logistic regression classifier is used for binary class classification, softmax classifier is a supervised learning algorithm which is mostly used when multiple classes are involved. Softmax classifier works by assigning a probability distribution to each class. The probability distribution of the class with the highest probability is normalized to 1, and all other […]
Initializing Weights for Deep Learning Models
In order to build a classifier that accurately classifies the data samples and performs well on test data, you need to initialize the weights in a way that the model converges well. Usually we randomized the weights. But when we use mean square error (MSE) as loss for training a logistic regression model, we may […]
Making Predictions with Logistic Regression in PyTorch
Logistic regression is a statistical technique for modeling the probability of an event. It is often used in machine learning for making predictions. We apply logistic regression when a categorical outcome needs to be predicted. In PyTorch, the construction of logistic regression is similar to that of linear regression. They both applied to linear inputs. […]
Training a Multi-Target Multilinear Regression Model in PyTorch
The multi-target multilinear regression model is a type of machine learning model that takes single or multiple features as input to make multiple predictions. In our earlier post, we discussed how to make simple predictions with multilinear regression and generate multiple outputs. Here we’ll build our model and train it on a dataset. In this […]
Multi-Target Predictions with Multilinear Regression in PyTorch
While in the previous few tutorials we worked with single output multilinear regression, here we’ll explore how we can use multilinear regression for multi-target predictions. Complex neural network architectures are essentially having each neuron unit to perform linear regression independently then pass on their result to another neuron. Therefore, knowing how such regression works is […]
Training a Single Output Multilinear Regression Model in PyTorch
A neural network architecture is built with hundreds of neurons where each of them takes in multiple inputs to perform a multilinear regression operation for prediction. In the previous tutorials, we built a single output multilinear regression model that used only a forward function for prediction. In this tutorial, we’ll add optimizer to our single […]
Making Predictions with Multilinear Regression in PyTorch
The multilinear regression model is a supervised learning algorithm that can be used to predict the target variable y given multiple input variables x. It is a linear regression problem where more than one input variables x or features are used to predict the target variable y. A typical use case of this algorithm is […]