25124b8389f80d7a509b2d98ef69589cab597c9a,data/single_dataset.py,SingleDataset,initialize,#SingleDataset#Any#,9
Before Change
self.A_paths = sorted(self.A_paths)
transform_list = []
if opt.resize_or_crop == "resize_and_crop":
transform_list.append(transforms.Scale(opt.loadSize))
if opt.isTrain and not opt.no_flip:
transform_list.append(transforms.RandomHorizontalFlip())
if opt.resize_or_crop != "no_resize":
transform_list.append(transforms.RandomCrop(opt.fineSize))
transform_list += [transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5),
(0.5, 0.5, 0.5))]
self.transform = transforms.Compose(transform_list)
def __getitem__(self, index):
A_path = self.A_paths[index]
After Change
self.A_paths = sorted(self.A_paths)
self.transform = get_transform(opt)
def __getitem__(self, index):
A_path = self.A_paths[index]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 36
Instances
Project Name: richzhang/colorization-pytorch
Commit Name: 25124b8389f80d7a509b2d98ef69589cab597c9a
Time: 2017-07-06
Author: tongzhou.wang.1994@gmail.com
File Name: data/single_dataset.py
Class Name: SingleDataset
Method Name: initialize
Project Name: richzhang/colorization-pytorch
Commit Name: 25124b8389f80d7a509b2d98ef69589cab597c9a
Time: 2017-07-06
Author: tongzhou.wang.1994@gmail.com
File Name: data/single_dataset.py
Class Name: SingleDataset
Method Name: initialize
Project Name: junyanz/pytorch-CycleGAN-and-pix2pix
Commit Name: 25124b8389f80d7a509b2d98ef69589cab597c9a
Time: 2017-07-06
Author: tongzhou.wang.1994@gmail.com
File Name: data/unaligned_dataset.py
Class Name: UnalignedDataset
Method Name: initialize