From 0732dde7e2a067a71a522e24b47b8f77ec3be16d Mon Sep 17 00:00:00 2001 From: Nis Meinert Date: Tue, 10 Sep 2024 10:59:41 +0200 Subject: [PATCH] docs: Improve example by adding missing import The example "Creating a Custom Dataset for your files" was missing the import `from torch.utils.data import Dataset`. Since other imports are shown and the purpose of this example is to show how to create a custom dataset, this import is crucial and should be added. --- beginner_source/basics/data_tutorial.py | 1 + 1 file changed, 1 insertion(+) diff --git a/beginner_source/basics/data_tutorial.py b/beginner_source/basics/data_tutorial.py index 561e9723fd..d04b8c2bac 100644 --- a/beginner_source/basics/data_tutorial.py +++ b/beginner_source/basics/data_tutorial.py @@ -120,6 +120,7 @@ import os import pandas as pd +from torch.utils.data import Dataset from torchvision.io import read_image class CustomImageDataset(Dataset):