c8a46a31f394ba2d0aef3993fdd49e355afbb5af,finetune/input_pipeline.py,BasePipeline,feed_shape_type_def,#BasePipeline#,45
Before Change
def feed_shape_type_def(self):
TS = tf.TensorShape
return (
({"tokens": tf.int32, "mask": tf.float32}, tf.float32),
(
{
"tokens": TS([self.config.max_length, 2]),
"mask": TS([self.config.max_length]),
},
TS([self.target_dim]),
),
)
def _array_format(self, encoded_output, pad_token=None):
Returns numpy array of token idxs and corresponding mask
After Change
def feed_shape_type_def(self):
TS = tf.TensorShape
types = {"tokens": tf.int32, "mask": tf.float32}
shapes = {
"tokens": TS([self.config.max_length, 2]),
"mask": TS([self.config.max_length]),
}
types, shapes = self._add_context_info_if_present(types, shapes)
return (
(types, tf.float32,),
(shapes, TS([self.target_dim]),),
)
def _array_format(self, encoded_output, pad_token=None):
Returns numpy array of token idxs and corresponding mask
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 19
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: feed_shape_type_def
Project Name: IndicoDataSolutions/finetune
Commit Name: c8a46a31f394ba2d0aef3993fdd49e355afbb5af
Time: 2020-01-10
Author: lily.zhang@indico.io
File Name: finetune/target_models/comparison_regressor.py
Class Name: ComparisonRegressionPipeline
Method Name: feed_shape_type_def
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: feed_shape_type_def
Project Name: IndicoDataSolutions/finetune
Commit Name: c8a46a31f394ba2d0aef3993fdd49e355afbb5af
Time: 2020-01-10
Author: lily.zhang@indico.io
File Name: finetune/target_models/comparison.py
Class Name: ComparisonPipeline
Method Name: feed_shape_type_def
Project Name: IndicoDataSolutions/finetune
Commit Name: c8a46a31f394ba2d0aef3993fdd49e355afbb5af
Time: 2020-01-10
Author: lily.zhang@indico.io
File Name: finetune/target_models/multiple_choice.py
Class Name: MultipleChoicePipeline
Method Name: feed_shape_type_def
Project Name: IndicoDataSolutions/finetune
Commit Name: c8a46a31f394ba2d0aef3993fdd49e355afbb5af
Time: 2020-01-10
Author: lily.zhang@indico.io
File Name: finetune/target_models/sequence_labeling.py
Class Name: SequencePipeline
Method Name: feed_shape_type_def