From the course: Up and Running with PyTorch by Pearson
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Working with devices - PyTorch Tutorial
From the course: Up and Running with PyTorch by Pearson
Working with devices
So, the second bit of the core of what makes PyTorch unique or powerful is its ability to run computations on, in general, accelerator devices. Most of the time, those accelerator devices are graphical processing units or GPUs. PyTorch makes it as simple and boring, in a sense, as possible. If you do want to just see whether or not Torch can identify any potential devices or For GPUs, you can run the torch.cuda is available function. In this case, we're actually printing out as false because this Google Colab notebook, I started with just the CPU runtime. So this is a good kind of practical or hopefully realistic example of what can happen. say we ran all of this code. We find out that we forgot to attach a GPU runtime. We change our runtime type. We can see here we have our CPU. Let's attach a T4 GPU. We save that. Notice up here that we're trying to connect to a new machine. Google Colab essentially has to reprovision its virtual machine. So now if we try to run any torch function…
Contents
-
-
-
What is PyTorch?4m 33s
-
The PyTorch layer cake11m 26s
-
The deep learning software trilemma7m 4s
-
(Locked)
What are tensors, really?5m 24s
-
(Locked)
Tensors in PyTorch10m 3s
-
(Locked)
Introduction to computational graphs12m 45s
-
(Locked)
Backpropagation is just the chain rule16m 31s
-
(Locked)
Effortless backpropagation with torch.autograd13m 39s
-
(Locked)
PyTorch's device abstraction: GPUs4m
-
(Locked)
Working with devices10m 47s
-
(Locked)
Components of a learning algorithm7m 9s
-
(Locked)
Introduction to gradient descent6m 4s
-
(Locked)
Getting to stochastic gradient descent (SGD)4m 8s
-
(Locked)
Comparing gradient descent and SGD5m 50s
-
(Locked)
Linear regression with PyTorch23m 56s
-
(Locked)
Perceptrons and neurons7m 52s
-
(Locked)
Layers and activations with torch.nn12m 41s
-
(Locked)
Multilayer feedforward neural networks (MLP)8m 58s
-
-