

Or if we were trying to build a sound classification app, our custom dataset might be sound samples alongside their sample labels. Or if we were trying to build a model to classify whether or not a text-based review on a website was positive or negative, our custom dataset might be examples of existing customer reviews and their ratings. In essence, a custom dataset can be comprised of almost anything.įor example, if we were building a food image classification app like Nutrify, our custom dataset might be images of food. Model 1: TinyVGG with Data Augmentationĩ.1 Create transform with data augmentationĩ.2 Create train and test Dataset's and DataLoader'sġ1.1 Loading in a custom image with PyTorchġ1.2 Predicting on custom images with a trained PyTorch modelġ1.3 Putting custom image prediction together: building a functionĪ custom dataset is a collection of data relating to a specific problem you're working on.

What should an ideal loss curve look like?Ĩ.3 The balance between overfitting and underfittingĩ. Model 0: TinyVGG without data augmentationħ.1 Creating transforms and loading data for Model 0ħ.3 Try a forward pass on a single image (to test the model)ħ.4 Use torchinfo to get an idea of the shapes going through our modelħ.6 Creating a train() function to combine train_step() and test_step()Ĩ. Other forms of transforms (data augmentation)ħ. Option 2: Loading Image Data with a Custom Datasetĥ.1 Creating a helper function to get class namesĥ.2 Create a custom Dataset to replicate ImageFolderĥ.3 Create a function to display random imagesĥ.4 Turn custom loaded images into DataLoader'sĦ. Option 1: Loading Image Data Using ImageFolderĥ. Become one with the data (data preparation)ģ.1 Transforming data with ansformsĤ. Importing PyTorch and setting up device-agnostic codeĢ.
