

def __init__(self):
    for (name, url) in URL_MAP.items():
        local_path = PATH_MAP[name]
        if (not os.path.exists(local_path)):
            logging.info('downloading %s dataset of binarized MNIST')
            np.save(local_path, np.loadtxt(urllib.urlretrieve(url)[0]))
    train_set = [(x,) for x in np.load(PATH_MAP['train'])]
    valid_set = [(x,) for x in np.load(PATH_MAP['valid'])]
    test_set = [(x,) for x in np.load(PATH_MAP['test'])]
    super(BinarizedMnistDataset, self).__init__(train_set, valid=valid_set, test=test_set)

dataset/ETHPy150Open zomux/deepy/deepy/dataset/binarized_mnist.py BinarizedMnistDataset.__init__/original