aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/toco/model.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-05-07 15:41:22 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-07 17:27:20 -0700
commitfc7f0b296dd53d1b72af21d36d36b6bcc5291ea7 (patch)
tree46e76ead2391a3fb1232459189ad0b8d0d8066ac /tensorflow/contrib/lite/toco/model.h
parent3a2f1cfb73fa6a21eba077485bdc08aa05646ad1 (diff)
Add support for select (via tf.where) support to tflite.
PiperOrigin-RevId: 195734246
Diffstat (limited to 'tensorflow/contrib/lite/toco/model.h')
-rw-r--r--tensorflow/contrib/lite/toco/model.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/toco/model.h b/tensorflow/contrib/lite/toco/model.h
index 7ee7841511..47f8db5978 100644
--- a/tensorflow/contrib/lite/toco/model.h
+++ b/tensorflow/contrib/lite/toco/model.h
@@ -133,6 +133,7 @@ enum class OperatorType {
// instead of being given as plain constant arrays. So we need to insert
// special nodes in the graph to shuffle axes.
kReorderAxes,
+ kSelect,
};
// Helper to deal with TensorFlow arrays using a different ordering of
@@ -1087,6 +1088,18 @@ struct NegOperator : Operator {
NegOperator() : Operator(OperatorType::kNeg) {}
};
+// Element-wise select operator choosing elements from inputs[1] or input[2]
+//
+// Inputs:
+// inputs[0]: required: boolean mask per index
+// inputs[1]: required: tensor of values if true
+// inputs[2]: required: tensor of values if false
+//
+// TensorFlow equivalent: Select
+struct SelectOperator : Operator {
+ SelectOperator() : Operator(OperatorType::kSelect) {}
+};
+
// Element-wise reciprocal-square-root (x^-0.5) operator.
//
// Inputs: