70e633a81a1eae82b7ad68285d4e9b4d26d4bf93,art/data_generators.py,KerasDataGenerator,__init__,#KerasDataGenerator#Any#Any#Any#,34

Before Change


        
        self.generator = generator

        if size is not None and (type(size) is not int or size < 1):
            raise ValueError("The total size of the dataset must be an integer greater than zero.")

        self.size = size

        if type(batch_size) is not int or batch_size < 1:
            raise ValueError("The batch size must be an integer greater than zero.")

        self.batch_size = batch_size

    def get_batch(self):
        
        Provide the next batch for training in the form of a tuple `(x, y)`. The generator should loop over the data

After Change


        :param batch_size: Size of the minibatches.
        :type batch_size: `int`
        
        super(KerasDataGenerator, self).__init__(size=size, batch_size=batch_size)
        self.generator = generator

    def get_batch(self):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 21

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 70e633a81a1eae82b7ad68285d4e9b4d26d4bf93
Time: 2019-01-21
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/data_generators.py
Class Name: KerasDataGenerator
Method Name: __init__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 70e633a81a1eae82b7ad68285d4e9b4d26d4bf93
Time: 2019-01-21
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/data_generators.py
Class Name: KerasDataGenerator
Method Name: __init__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 70e633a81a1eae82b7ad68285d4e9b4d26d4bf93
Time: 2019-01-21
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/data_generators.py
Class Name: PyTorchDataGenerator
Method Name: __init__


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 70e633a81a1eae82b7ad68285d4e9b4d26d4bf93
Time: 2019-01-21
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/data_generators.py
Class Name: MXDataGenerator
Method Name: __init__