Category: Other

#014 PyTorch – Convolutional Neural Network on MNIST in PyTorch

Highlights: Hello everyone and welcome back. In the last posts we have seen some basic operations on what tensors are, and how to build a Shallow Neural Network. In this post we will demonstrate how to build efficient Convolutional Neural Networks using the nn module In Pytorch. You will find that it is simpler and more powerful. To demonstrate how it works, we will be using a dataset called MNIST. Tutorial Overview: Setting up the…
Read more

#001 PyTorch – How to Install PyTorch with Anaconda and use it on Colab?

Highlights: Welcome everyone! In this post we are going to cover the prerequisites for installing PyTorch on our machines. In addition, we will show how you can use PyTorch in Google Colab. It’s relatively easy to get it up and running, so let’s roll. Tutorial Overview: PyTorch installation with Anaconda How to verify the installation? Using Google Colab 1. PyTorch installation with Anaconda Due to simplicity, the recommended option to start with is to use…
Read more

#013 PyTorch – Shallow Neural Network on MNIST dataset in PyTorch

Highlights: Hello everyone and welcome back. In the previous post we have seen how to build one Shallow Neural Network and tested it on a dataset of random points. In this post we will demonstrate how to build efficient Neural Networks using the nn module. That means that we are going to use a fully-connected ReLU network with one hidden layer, trained to predict the output \(y \) from given \(x \) by minimizing squared…
Read more

#012 PyTorch – How to implement Shallow Neural Network in PyTorch

Highlights: Welcome everyone! In this post we will learn how to use PyTorch for building a shallow neural network. If you want to go through a much detailed theoretical explanation about neural networks, and in particular a shallow neural network you can check out these blog posts. So, let’s start implementing one in PyTorch. Tutorial Overview: Data Preparation Define Model Structure Loss Function (Criterion) and Optimizer Model Training Testing our Model Visualize our Predictions 1.…
Read more

#002 PyTorch – Tensors – The main data structure

Highlights: Welcome everyone! In this post we will cover the main data structure of PyTorch – tensors. Before we proceed with tensors, we will first give a quick overview of what PyTorch is and why it has been popular lately. Next, in the following posts we will use this knowledge to build interesting applications. Tutorial Overview: What is PyTorch?. What is a Tensor? 1. What is PyTorch? PyTorch is an open-source Python framework released from…
Read more