oasjd7
(oasjd7)
January 25, 2019, 6:17am
1
Hi,
Is there any way to use USPS 16x16 dataset (not 28x28) in pytorch?
Kaggle provides USPS in h5py format(https://www.kaggle.com/bistaumanga/usps-dataset ), but I don’t know how to use in pytorch dataloader.
Anyone can help?
oasjd7
(oasjd7)
January 25, 2019, 6:43am
2
I find tensorflow code.
Is it possible to use this in pytorch?
import gzip
import os
from urllib.parse import urljoin
import numpy as np
from adda.data import DatasetGroup
from adda.data import ImageDataset
from adda.data import util
from adda.data.dataset import register_dataset
@register_dataset('usps')
class USPS(DatasetGroup):
"""USPS handwritten digits.
Homepage: http://statweb.stanford.edu/~hastie/ElemStatLearn/data.html
Images are 16x16 grayscale images in the range [0, 1].
"""
This file has been truncated. show original
Deeply
(Deeply)
January 27, 2019, 12:43pm
3
PyTorch datasets and dataloaders are pretty neat and simple. Please have a look of how to do this here .