7f6852042663cb04bab39253a29e48d81c262e28,finetune/base.py,BaseModel,generate_text,#BaseModel#Any#Any#Any#,463

Before Change


            warnings.filterwarnings("ignore")
            for i in range(len(encoded.token_ids), (max_length or self.config.max_length) - 2):
                arr_encoded = self._array_format(encoded)
                class_idx = self.sess.run(self.lm_predict_op, {self.X: arr_encoded.token_ids, self.M: arr_encoded.mask})
                encoded.token_ids[0].append(class_idx[i])
                if encoded.token_ids[0][-1] == EOS:
                    break

After Change


            warnings.filterwarnings("ignore")
            for i in range(len(encoded.token_ids), (max_length or self.config.max_length) - 2):
                arr_encoded = self._array_format(encoded)
                estimator.predict(input_fn=get_input_fn)
                class_idx = predict_fn()[PredictMode.GENERATE_TEXT]
                encoded.token_ids[0].append(class_idx[i])
                if encoded.token_ids[0][-1] == EOS:
                    break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: 7f6852042663cb04bab39253a29e48d81c262e28
Time: 2018-09-25
Author: benlt@hotmail.co.uk
File Name: finetune/base.py
Class Name: BaseModel
Method Name: generate_text


Project Name: IndicoDataSolutions/finetune
Commit Name: 01713868bcc1b6edcdfb07a14fa5854b470cba32
Time: 2018-09-25
Author: benlt@hotmail.co.uk
File Name: finetune/base.py
Class Name: BaseModel
Method Name: _featurize


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 706a4e840607d50dc94249150366a23ba720a900
Time: 2017-09-06
Author: carlo.deramo@gmail.com
File Name: examples/deep_fqi_atari/extractor.py
Class Name: Extractor
Method Name: __call__