diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-18 12:55:42 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-18 12:59:31 -0700 |
commit | f1a1496148ea8a828e37201b8d0ab5d7e4979a1a (patch) | |
tree | f33c2a456b66af0204833e4e77c04cd3eda1a7eb /tensorflow/contrib/lite/toco/model.h | |
parent | 9fd62257907ed2df20bd89f9346dbe91ada1fbbc (diff) |
Fixing gather to support round-tripping non-zero axis.
PiperOrigin-RevId: 205122011
Diffstat (limited to 'tensorflow/contrib/lite/toco/model.h')
-rw-r--r-- | tensorflow/contrib/lite/toco/model.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/toco/model.h b/tensorflow/contrib/lite/toco/model.h index 8fff68cf47..15f5d9c354 100644 --- a/tensorflow/contrib/lite/toco/model.h +++ b/tensorflow/contrib/lite/toco/model.h @@ -23,6 +23,7 @@ limitations under the License. #include <unordered_map> #include <vector> +#include "absl/types/optional.h" #include "tensorflow/contrib/lite/toco/model_flags.pb.h" #include "tensorflow/contrib/lite/toco/runtime/types.h" #include "tensorflow/contrib/lite/toco/toco_port.h" @@ -1525,11 +1526,15 @@ struct FloorOperator : Operator { // Inputs: // inputs[0]: required: the params array // inputs[1]: required: the indices to gather +// inputs[2]: optional: axis // // TensorFlow equivalent: Gather struct GatherOperator : Operator { GatherOperator() : Operator(OperatorType::kGather) {} - int axis = 0; + // Axis is populated explicitly or implicitly from the axis input by + // ResolveGatherAttributes. An empty axis indicates that the axis has not yet + // be resolved. + absl::optional<int> axis; int input_rank = 0; }; |