755483e22a22c7445293ec19fbc4c0487433a5d4,implementations/discogan/datasets.py,ImageDataset,__getitem__,#ImageDataset#,17
Before Change
item_A = self.transform(Image.open(self.files_A[index % len(self.files_A)]))
if self.unaligned:
item_B = self.transform(Image.open(self.files_B[random.randint(0, len(self.files_B) - 1)]))
else:
item_B = self.transform(Image.open(self.files_B[index % len(self.files_B)]))
return {"A": item_A, "B": item_B}
After Change
def __getitem__(self, index):
img_pair = self.transform(Image.open(self.files[index % len(self.files)]))
_, h, w = img_pair.shape
half_w = int(w/2)
item_A = img_pair[:, :, :half_w]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 755483e22a22c7445293ec19fbc4c0487433a5d4
Time: 2018-04-23
Author: eriklindernoren@gmail.com
File Name: implementations/discogan/datasets.py
Class Name: ImageDataset
Method Name: __getitem__
Project Name: Belval/TextRecognitionDataGenerator
Commit Name: e047bcec68ebf51feaf0dc8f9e9d81b4db87baf2
Time: 2018-10-23
Author: edouard@belval.org
File Name: TextRecognitionDataGenerator/computer_text_generator.py
Class Name: ComputerTextGenerator
Method Name: generate
Project Name: eriklindernoren/Keras-GAN
Commit Name: cf65784f7297dca491436112b9a5689ecd7533ec
Time: 2018-05-15
Author: eriklindernoren@live.se
File Name: acgan/acgan.py
Class Name: ACGAN
Method Name: train