Aan de slagGa gratis aan de slag

Two-output Dataset and DataLoader

In this and the following exercises, you will build a two-output model to predict both the character and the alphabet it comes from based on the character's image. As always, you will start with getting the data ready.

The OmniglotDataset class you have created before is available for you to use along with updated samples. Let's use it to build the Dataset and the DataLoader.

The following imports have already been done for you:

from torch.utils.data import Dataset, DataLoader
from torchvision import transforms

Deze oefening maakt deel uit van de cursus

Intermediate Deep Learning with PyTorch

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Print the sample at index 100
____
Code bewerken en uitvoeren