6f90dac721f38b365ad87e1633860f53b9ca44db,discogan/data_loader.py,DataLoader,load_data,#DataLoader#Any#Any#,10

Before Change


        batch_B = [path_B[i] for i in idx]

        imgs_A, imgs_B = [], []
        for img_path_A, img_path_B in zip(batch_A, batch_B):
            img_A = self.imread(img_path_A)
            img_B = self.imread(img_path_B)

            img_A = scipy.misc.imresize(img_A, self.img_res)
            img_B = scipy.misc.imresize(img_B, self.img_res)

            if not is_testing and np.random.random() > 0.5:
                    img_A = np.fliplr(img_A)
                    img_B = np.fliplr(img_B)

            imgs_A.append(img_A)
            imgs_B.append(img_B)

        imgs_A = np.array(imgs_A)/127.5 - 1.
        imgs_B = np.array(imgs_B)/127.5 - 1.

        return imgs_A, imgs_B

After Change


        for img in batch:
            img = self.imread(img)
            h, w, _ = img.shape
            half_w = int(w/2)
            img_A = img[:, :half_w, :]
            img_B = img[:, half_w:, :]

            img_A = scipy.misc.imresize(img_A, self.img_res)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: eriklindernoren/Keras-GAN
Commit Name: 6f90dac721f38b365ad87e1633860f53b9ca44db
Time: 2018-03-14
Author: eriklindernoren@gmail.com
File Name: discogan/data_loader.py
Class Name: DataLoader
Method Name: load_data


Project Name: allenai/allennlp
Commit Name: 0459261c388bec72937e0268c4316b85279d0bac
Time: 2018-09-24
Author: kl2806@columbia.edu
File Name: allennlp/semparse/contexts/atis_tables.py
Class Name:
Method Name: get_numbers_from_utterance


Project Name: tensorflow/models
Commit Name: 90f63a1e1653bfa17fde8260a4aa20231b269b7d
Time: 2017-06-29
Author: alexleegk@gmail.com
File Name: video_prediction/prediction_model.py
Class Name:
Method Name: cdna_transformation