c87070113341a10fe35e4a3d6ff25c8e54d69feb,finetune/base.py,BaseModel,_predict,#BaseModel#Any#Any#,420

Before Change



    def _predict(self, Xs, context=None, **kwargs):
        raw_preds = self._inference(Xs, predict_keys=[PredictMode.NORMAL], context=context, **kwargs)
        return self.input_pipeline.label_encoder.inverse_transform(
            np.asarray(raw_preds)
        )

    def predict(self, Xs, context=None, **kwargs):
        if self.config.sort_by_length:
            Xs, invert_idxs = self._sort_by_length(Xs)

After Change


        return self.finetune(*args, **kwargs)

    def _predict(self, Xs, context=None, **kwargs):
        raise NotImplemented()

    def predict(self, Xs, context=None, **kwargs):
        if self.config.sort_by_length:
            Xs, invert_idxs = self._sort_by_length(Xs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: c87070113341a10fe35e4a3d6ff25c8e54d69feb
Time: 2020-04-16
Author: benlt@hotmail.co.uk
File Name: finetune/base.py
Class Name: BaseModel
Method Name: _predict


Project Name: nilearn/nilearn
Commit Name: 7230e5f4cc845ae47d18ca180d9d7e26b16a9a32
Time: 2015-08-05
Author: abraham.alexandre@gmail.com
File Name: nilearn/input_data/base_masker.py
Class Name: BaseMasker
Method Name: transform_single_imgs


Project Name: deepchem/deepchem
Commit Name: 1330ea3102315bd79c9c6efdbd8818c8e2a3cb8f
Time: 2019-07-09
Author: peastman@stanford.edu
File Name: deepchem/metalearning/maml.py
Class Name: MetaLearner
Method Name: variables


Project Name: carpedm20/ENAS-pytorch
Commit Name: 808b8fb7a5a17e2b47d13103ed3a78dfdcd2fe3f
Time: 2018-02-20
Author: carpedm20@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: get_reward