Skip to content

Instantly share code, notes, and snippets.

View MattKleinsmith's full-sized avatar

Matt Kleinsmith MattKleinsmith

View GitHub Profile
MattKleinsmith /
Last active January 30, 2023 06:40 — forked from kevinzakka/
Train, Validation and Test Split for torchvision MNIST Dataset
# This is an example for the MNIST dataset (formerly CIFAR-10).
# There's a function for creating a train and validation iterator.
# There's also a function for creating a test iterator.
# Inspired by
# Adapted for MNIST by
import numpy as np
import torch