def digit_load(args):
    global inverse_transform
    train_bs = args.batch_size
    if (args.dset == 's'):
        test_source = svhn.SVHN('./data/svhn/', split='test', download=True, transform=transforms.Compose([transforms.Resize(32), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]))
    elif (args.dset == 'u'):
        test_source = usps.USPS('./data/usps/', train=False, download=True, transform=transforms.Compose([transforms.RandomCrop(28, padding=4), transforms.RandomRotation(10), transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))]))
    elif (args.dset == 'm'):
        test_source = mnist.MNIST('./data/mnist/', train=False, download=True, transform=transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))]))
    dset_loaders = {}
    dset_loaders['test'] = DataLoader(test_source, batch_size=(train_bs * 2), shuffle=False, num_workers=args.worker, drop_last=False)
    return dset_loaders
def digit_load(args):
    global inverse_transform
    train_bs = args.batch_size
    if (args.dset == 's'):
        test_source = svhn.SVHN('./data/svhn/', split='test', download=True, transform=transforms.Compose([transforms.Resize(32), transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]))
    elif (args.dset == 'u'):
        test_source = usps.USPS('./data/usps/', train=False, download=True, transform=transforms.Compose([transforms.RandomCrop(28, padding=4), transforms.RandomRotation(10), transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))]))
    elif (args.dset == 'm'):
        test_source = mnist.MNIST('./data/mnist/', train=False, download=True, transform=transforms.Compose([transforms.ToTensor(), transforms.Normalize((0.5,), (0.5,))]))
    dset_loaders = {}
    dset_loaders['test'] = DataLoader(test_source, batch_size=(train_bs * 2), shuffle=False, num_workers=args.worker, drop_last=False)
    return dset_loaders