Open Longchao1047027852 opened 8 months ago
def get_dataloader(opt): transform = transforms.Compose([ # transforms.Resize(img_shape), transforms.ToTensor(), ]) if opt.task == 'face_recognition': dataset = torchvision.datasets.ImageFolder(opt.root, transform=transform) elif opt.task == 'classification': opt.root = '/home/lgz/sss/code/data/cifar-10-batches-py' dataset = torchvision.datasets.CIFAR10(opt.root, train=False, download=False, transform=transform) else: print('Unable to identify the target task!') raise Exception data_loader = torch.utils.data.DataLoader(dataset, batch_size=opt.batch_size, shuffle=True) return data_loader
Hello author, may I ask if the training set used in the classification task is the test set of Cifar10? Or is there a problem when uploading this piece of code?
The code we provide is validation of the code tested on the Cifar10 test set. If you are referring to the training set for key model training, we are using the COCO dataset for training the key model after random cropping. The CycleGAN code can be used directly to train a pix2pix model as a key model.
def get_dataloader(opt): transform = transforms.Compose([
transforms.Resize(img_shape),
Hello author, may I ask if the training set used in the classification task is the test set of Cifar10? Or is there a problem when uploading this piece of code?