8f420a3b35944dcfa470dee958ef61dee221ce02,implementations/dualgan/datasets.py,MNISTM,__getitem__,#MNISTM#Any#,60
Before Change
// doing this so that it is consistent with all other datasets
// to return a PIL Image
img = Image.fromarray(img.squeeze().numpy(), mode="RGB")
if self.transform is not None:
img = self.transform(img)
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]
item_B = img_pair[:, :, half_w:]
return {"A": item_A, "B": item_B}
def __len__(self):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 8f420a3b35944dcfa470dee958ef61dee221ce02
Time: 2018-04-23
Author: eriklindernoren@gmail.com
File Name: implementations/dualgan/datasets.py
Class Name: MNISTM
Method Name: __getitem__
Project Name: rail-berkeley/softlearning
Commit Name: 402c19b19b4267cdfc725463b7b9d538fd2ed5ab
Time: 2018-07-09
Author: kristian.hartikainen@gmail.com
File Name: softlearning/environments/image_pusher.py
Class Name: ImagePusherEnv
Method Name: get_current_obs
Project Name: PavlosMelissinos/enet-keras
Commit Name: fd5fdd2507cb26d746324ae7bfd6c280580dd5e6
Time: 2017-05-04
Author: pmelissi@iti.gr
File Name: src/predict.py
Class Name:
Method Name: predict_pillow
Project Name: openai/baselines
Commit Name: bb403781182c6e31d3bf5de16f42b0cb0d8421f7
Time: 2017-10-25
Author: joschu@openai.com
File Name: baselines/common/atari_wrappers.py
Class Name: WarpFrame
Method Name: _observation