MulaiMulai sekarang secara gratis

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

Latihan ini adalah bagian dari kursus

Intermediate Deep Learning with PyTorch

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Print the sample at index 100
____
Edit dan Jalankan Kode