def get_data(): d1 = dataset.SVHNDigit('train') d2 = dataset.SVHNDigit('extra') data_train = RandomMixData([d1, d2]) data_train = DisturbLabel(data_train, args.prob) data_test = dataset.SVHNDigit('test') augmentors = [ imgaug.Resize((40, 40)), imgaug.Brightness(30), imgaug.Contrast((0.5,1.5)),
def get_data(): d1 = dataset.SVHNDigit('train') d2 = dataset.SVHNDigit('extra') data_train = RandomMixData([d1, d2]) data_train = DisturbLabel(data_train, args.prob) data_test = dataset.SVHNDigit('test') augmentors = [ imgaug.Resize((40, 40)), imgaug.Brightness(30), imgaug.Contrast((0.5, 1.5)), ] data_train = AugmentImageComponent(data_train, augmentors) data_train = BatchData(data_train, 128) data_train = PrefetchData(data_train, 5, 5) augmentors = [imgaug.Resize((40, 40))] data_test = AugmentImageComponent(data_test, augmentors) data_test = BatchData(data_test, 128, remainder=True) return data_train, data_test
def get_data(): dataset_train = BatchData(DisturbLabel(dataset.Mnist('train'), args.prob), 128) dataset_test = BatchData(dataset.Mnist('test'), 256, remainder=True) return dataset_train, dataset_test