Building Multilayer Perceptron Models in PyTorch

The PyTorch library is for deep learning. Deep learning, indeed, is just another name for a large-scale neural network or multilayer perceptron network. In its simplest form, multilayer perceptrons are a sequence of layers connected in tandem. In this post, you will discover the simple components you can use to create neural networks and simple deep learning models in PyTorch. Kick-start your project with my book Deep Learning with PyTorch. It provides self-study tutorials with working code. Let’s get started. […]

Read more

Develop Your First Neural Network with PyTorch, Step by Step

PyTorch is a powerful Python library for building deep learning models. It provides everything you need to define and train a neural network and use it for inference. You don’t need to write much code to complete all this. In this pose, you will discover how to create your first deep learning neural network model in Python using PyTorch. After completing this post, you will know: How to load a CSV dataset and prepare it for use with PyTorch How […]

Read more

Creating a Training Loop for PyTorch Models

PyTorch provides a lot of building blocks for a deep learning model, but a training loop is not part of them. It is a flexibility that allows you to do whatever you want during training, but some basic structure is universal across most use cases. In this post, you will see how to make a training loop that provides essential information for your model training, with the option to allow any information to be displayed. After completing this post, you […]

Read more

How to Evaluate the Performance of PyTorch Models

Designing a deep learning model is sometimes an art. There are a lot of decision points, and it is not easy to tell what is the best. One way to come up with a design is by trial and error and evaluating the result on real data. Therefore, it is important to have a scientific method to evaluate the performance of your neural network and deep learning models. In fact, it is also the same method to compare any kind […]

Read more

Building a Multiclass Classification Model in PyTorch

The PyTorch library is for deep learning. Some applications of deep learning models are used to solve regression or classification problems. In this tutorial, you will discover how to use PyTorch to develop and evaluate neural network models for multi-class classification problems. After completing this step-by-step tutorial, you will know: How to load data from CSV and make it available to PyTorch How to prepare multi-class classification data for modeling with neural networks How to use cross validation to evaluate […]

Read more

Building a Binary Classification Model in PyTorch

PyTorch library is for deep learning. Some applications of deep learning models are to solve regression or classification problems.In this post, you will discover how to use PyTorch to develop and evaluate neural network models for binary classification problems. After completing this post, you will know: How to load training data and make it available to PyTorch How to design and train a neural network How to evaluate the performance of a neural network model using k-fold cross validation How […]

Read more

Building a Regression Model in PyTorch

PyTorch library is for deep learning. Some applications of deep learning models are to solve regression or classification problems.In this post, you will discover how to use PyTorch to develop and evaluate neural network models for regression problems. After completing this post, you will know: How to load data from scikit-learn and adapt it for PyTorch models How to create a neural network for regerssion problem using PyTorch How to improve model performance with data preparation techniques Kick-start your project […]

Read more

Use PyTorch Deep Learning Models with scikit-learn

The most popular deep learning libraries in Python for research and development are TensorFlow/Keras and PyTorch, due to their simplicity. The scikit-learn library, however, is the most popular library for general machine learning in Python. In this post, you will discover how to use deep learning models from PyTorch with the scikit-learn library in Python. This will allow you to leverage the power of the scikit-learn library for tasks like model evaluation and model hyper-parameter optimization. After completing this lesson […]

Read more

How to Grid Search Hyperparameters for PyTorch Models

The “weights” of a neural network is referred as “parameters” in PyTorch code and it is fine-tuned by optimizer during training. On the contrary, hyperparameters are the parameters of a neural network that is fixed by design and not tuned by training. Examples are the number of hidden layers and the choice of activation functions. Hyperparameter optimization is a big part of deep learning. The reason is that neural networks are notoriously difficult to configure, and a lot of parameters […]

Read more

Save and Load Your PyTorch Models

A deep learning model is a mathematical abstraction of data, in which a lot of parameters are involved. Training these parameters can take hours, days, and even weeks but afterward, you can make use of the result to apply on new data. This is called inference in machine learning. It is important to know how we can preserve the trained model in disk and later, load it for use in inference. In this post, you will discover how to save […]

Read more
1 79 80 81 82 83 920