Skip to content

Instantly share code, notes, and snippets.

View v-raghav's full-sized avatar
:octocat:

Raghav V v-raghav

:octocat:
  • AMD
View GitHub Profile
@v-raghav
v-raghav / data_loader.py
Created March 11, 2020 20:47 — forked from kevinzakka/data_loader.py
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np