c8a46a31f394ba2d0aef3993fdd49e355afbb5af,finetune/input_pipeline.py,BasePipeline,_dataset_with_targets,#BasePipeline#Any#Any#Any#Any#,148

Before Change


        return Counter(self.label_encoder.inverse_transform(target_arrs))

    def _dataset_with_targets(self, Xs, Y, train, context=None):
        if context is None:
            context = [None] * len(Xs)
        if not callable(Xs) and not callable(Y):
            dataset = lambda: zip(Xs, Y, context)
        elif callable(Xs) and callable(Y):
            dataset = lambda: zip(Xs(), Y(), context)

After Change


        else:
            if not callable(Xs) and not callable(Y):
                dataset = lambda: zip(Xs, Y)
            elif callable(Xs) and callable(Y):
                dataset = lambda: zip(Xs(), Y())
            else:
                raise ValueError( "Either neither or both of Xs and Y should be callable, not a mixture")
            dataset_encoded = lambda: itertools.chain.from_iterable(
                map(lambda xy: self.text_to_tokens_mask(*xy), dataset())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: c8a46a31f394ba2d0aef3993fdd49e355afbb5af
Time: 2020-01-10
Author: lily.zhang@indico.io
File Name: finetune/input_pipeline.py
Class Name: BasePipeline
Method Name: _dataset_with_targets


Project Name: IndicoDataSolutions/finetune
Commit Name: c8a46a31f394ba2d0aef3993fdd49e355afbb5af
Time: 2020-01-10
Author: lily.zhang@indico.io
File Name: finetune/input_pipeline.py
Class Name: BasePipeline
Method Name: _dataset_without_targets


Project Name: keras-team/keras
Commit Name: 1dc67f374cde47a721e5fe5d9237bc2573bda2f0
Time: 2017-07-06
Author: souptc@gmail.com
File Name: keras/backend/cntk_backend.py
Class Name:
Method Name: in_test_phase