def test_get_inputs(self): d = MNIST(repo_path=self.tmp_repo) d.backend = CPU(rng_seed=0) d.backend.actual_batch_size = 128 par = NoPar() par.associate(d.backend) inputs = d.get_inputs(train=True) # TODO: make this work (numpy import errors at the moment) assert inputs['train'] is not None
def test_coarse_labels(self): data = CIFAR100(coarse=True, repo_path=self.tmp_repo) data.backend = CPU(rng_seed=0) data.backend.actual_batch_size = 128 par = NoPar() par.associate(data.backend) data.load() assert len(data.inputs['train']) == 50000 assert len(data.targets['train'][0]) == 20