76bedc874bc399c4171086d7fce4121e3fc8f860,deeppavlov/data/dataset.py,Dataset,batch_generator,#Dataset#Any#Any#,16

Before Change


        Returns:
            batch_gen: a generator, that iterates through the part (defined by data_type) of dataset
        
        raise NotImplementedError("Batch generator must be implemented for Dataset class!")

    def iter_all(self):
        rIterate through all data. It can be used for building dictionary or

After Change


        data_len = len(data)
        order = list(range(data_len))
        random.shuffle(order)
        for i in range((data_len - 1) // batch_size + 1):
            yield list(zip(*[data[o] for o in order[i*batch_size:(i+1)*batch_size]]))

    def iter_all(self, data_type: str = "train") -> Generator:
        rIterate through all data. It can be used for building dictionary or

        Returns:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 76bedc874bc399c4171086d7fce4121e3fc8f860
Time: 2017-12-07
Author: yoptar@gmail.com
File Name: deeppavlov/data/dataset.py
Class Name: Dataset
Method Name: batch_generator


Project Name: tflearn/tflearn
Commit Name: e96e2ae8a6888473093726b925b13012a2f4ce8b
Time: 2016-05-15
Author: aymeric.damien@gmail.com
File Name: tflearn/helpers/evaluator.py
Class Name: Evaluator
Method Name: evaluate


Project Name: GPflow/GPflow
Commit Name: 45fed420bcc3b0767b581b4ee804e0865e92a7a8
Time: 2018-06-28
Author: mikhailbeck@gmail.com
File Name: gpflow/training/scipy_optimizer.py
Class Name: ScipyOptimizer
Method Name: minimize