Skip to content

Instantly share code, notes, and snippets.

View chhanganivarun's full-sized avatar
🙂
sudo rm -rf --no-preserve-root /

Varun Chhangani chhanganivarun

🙂
sudo rm -rf --no-preserve-root /
View GitHub Profile
@chhanganivarun
chhanganivarun / data_loader.py
Created April 10, 2021 14:29 — 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