December 2019
Intermediate to advanced
468 pages
14h 28m
English
Now that we know what TL is, let's look at whether it works in practice. In this section, we'll apply an advanced ImageNet pretrained network on the CIFAR-10 images with PyTorch 1.3.1 and the torchvision 0.4.2 package. We'll use both types of TL. It's preferable to run this example on a GPU.
Let's get started:
import torchimport torch.nn as nnimport torch.optim as optimimport torchvisionfrom torchvision import models, transforms
batch_size = 50
Read now
Unlock full access