Loading and Providing Datasets in PyTorch

Structuring the data pipeline in a way that it can be effortlessly linked to your deep learning model is an important aspect of any deep learning-based system. PyTorch packs everything to do just that. While in the previous tutorial, we used simple datasets, we’ll need to work with larger datasets in real world scenarios in order to fully exploit the potential of deep learning and neural networks. In this tutorial, you’ll learn how to build custom datasets in PyTorch. While […]

Read more

Making Linear Predictions in PyTorch

Linear regression is a statistical technique for estimating the relationship between two variables. A simple example of linear regression is to predict the height of someone based on the square root of the person’s weight (that’s what BMI is based on). To do this, we need to find the slope and intercept of the line. The slope is how much one variable changes with the change in other variable by one unit. The intercept is where our line crosses with […]

Read more

Training a Linear Regression Model in PyTorch

Linear regression is a simple yet powerful technique for predicting the values of variables based on other variables. It is often used for modeling relationships between two or more continuous variables, such as the relationship between income and age, or the relationship between weight and height. Likewise, linear regression can be used to predict continuous outcomes such as price or quantity demand, based on other variables that are known to influence these outcomes. In order to train a linear regression […]

Read more

Implementing Gradient Descent in PyTorch

The gradient descent algorithm is one of the most popular techniques for training deep neural networks. It has many applications in fields such as computer vision, speech recognition, and natural language processing. While the idea of gradient descent has been around for decades, it’s only recently that it’s been applied to applications related to deep learning. Gradient descent is an iterative optimization method used to find the minimum of an objective function by updating values iteratively on each step. With […]

Read more

Mini-Batch Gradient Descent and DataLoader in PyTorch

Mini-batch gradient descent is a variant of gradient descent algorithm that is commonly used to train deep learning models. The idea behind this algorithm is to divide the training data into batches, which are then processed sequentially. In each iteration, we update the weights of all the training samples belonging to a particular batch together. This process is repeated with different batches until the whole training data has been processed. Compared to batch gradient descent, the main benefit of this […]

Read more

Using Optimizers from PyTorch

Optimization is a process where we try to find the best possible set of parameters for a deep learning model. Optimizers generate new parameter values and evaluate them using some criterion to determine the best option. Being an important part of neural network architecture, optimizers help in determining best weights, biases or other hyper-parameters that will result in the desired output. There are many kinds of optimizers available in PyTorch, each with its own strengths and weaknesses. These include Adagrad, […]

Read more

Training and Validation Data in PyTorch

Training data is the set of data that a machine learning algorithm uses to learn. It is also called training set. Validation data is one of the sets of data that machine learning algorithms use to test their accuracy. To validate an algorithm’s performance is to compare its predicted output with the known ground truth in validation data. Training data is usually large and complex, while validation data is usually smaller. The more training examples there are, the better the […]

Read more

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 predicting the price of a house given its size, number of rooms, and age. In previous tutorials, we focused on simple linear regression where we […]

Read more

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 output multilinear regression model and perform backpropagation to reduce the loss of the model. Particularly, we’ll demonstrate: How to build a single output multilinear regression […]

Read more

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 useful to understand how a neural network performs multi-target predictions. The goal of this article is to provide a step-by-step guide for the implementation of […]

Read more
1 77 78 79 80 81 920