d771d58a66c57aa77b8ef61501bf879de25c0c8c,deeppavlov/dataset_iterators/ranking_iterator.py,RankingIterator,gen_batches,#RankingIterator#Any#Any#Any#,31

Before Change


        }

    def gen_batches(self, batch_size, data_type="train", shuffle=True):
        y = np.zeros(batch_size)
        data = self.data[data_type]
        num_steps = len(data) // batch_size
        if data_type == "train":
            if shuffle:

After Change


                context = [el["context"] for el in context_response_data]
                response = [el["response"] for el in context_response_data]
                negative_response = self.create_neg_resp_rand(context_response_data, batch_size, data_type)
                x = [[context[i], [response[i]]+[negative_response[i]]] for i in range(len(context_response_data))]
                yield (x, y)
        if data_type in ["valid", "test"]:
            for i in range(num_steps + 1):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: d771d58a66c57aa77b8ef61501bf879de25c0c8c
Time: 2018-05-24
Author: puleon@mail.ru
File Name: deeppavlov/dataset_iterators/ranking_iterator.py
Class Name: RankingIterator
Method Name: gen_batches


Project Name: deepchem/deepchem
Commit Name: 624dfb1a1263e5539d30112e2ba7344957b9b20f
Time: 2020-07-20
Author: peastman@stanford.edu
File Name: deepchem/feat/coulomb_matrices.py
Class Name: CoulombMatrix
Method Name: coulomb_matrix


Project Name: microsoft/nni
Commit Name: 89fa23cb77746d36b4f1ff6cd4fcefbab18c7d70
Time: 2020-06-11
Author: 38930155+chicm-ms@users.noreply.github.com
File Name: src/sdk/pynni/tests/test_compressor.py
Class Name: CompressorTestCase
Method Name: test_torch_l1filter_pruner