diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-05-04 18:49:08 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-05-05 08:45:32 -0700 |
commit | 5fb53fe69afe7f9106a8bcb5632cea23cf227d78 (patch) | |
tree | 2658e05fa2481666efbea50c56909abfec3f938f /tensorflow/contrib/lite/toco/model.h | |
parent | dd5ef1b9fc22b37e5eec87d659a3af064ca54b8b (diff) |
add support for PadV2
PiperOrigin-RevId: 195503894
Diffstat (limited to 'tensorflow/contrib/lite/toco/model.h')
-rw-r--r-- | tensorflow/contrib/lite/toco/model.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/toco/model.h b/tensorflow/contrib/lite/toco/model.h index 482cc71d8b..7ee7841511 100644 --- a/tensorflow/contrib/lite/toco/model.h +++ b/tensorflow/contrib/lite/toco/model.h @@ -82,6 +82,7 @@ enum class OperatorType { kStack, kBatchToSpaceND, kPad, + kPadV2, kStridedSlice, kSlice, kSqueeze, @@ -825,6 +826,29 @@ struct PadOperator : Operator { std::vector<int> right_padding; }; +// PaddingV2 operator. Pads a tensor with the given constant value. +// +// Inputs: +// inputs[0]: required: the input array +// inputs[1]: required: the padding array +// inputs[2]: required: the scalar constant_values +// +// This operation pads input according to the paddings and constant_values you +// specify. paddings is an integer tensor with shape [Dn, 2], where n is the +// rank of input. For each dimension D of input, paddings[D, 0] indicates how +// many padding values to add before the contents of input in that dimension, +// and paddings[D, 1] indicates how many padding values to add after the +// contents of input in that dimension. constant_values is a scalar tensor of +// the same type as input that indicates the value to use for padding input. +// +// TensorFlow equivalent: PadV2 +struct PadV2Operator : Operator { + PadV2Operator() : Operator(OperatorType::kPadV2) {} + + std::vector<int> left_padding; + std::vector<int> right_padding; +}; + // Strided slice operator. // // Inputs: |