aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-12-14 15:39:14 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-14 15:45:33 -0800
commit811629aed466db32eeefbd60783e199d2fe154a9 (patch)
treeec24e6450bb0711f5ddc549b0a73892403e59da5
parenta7cd5f671eb2219a763fe2d77c38ca61bff23f04 (diff)
Add Tactivation attribute for QuantizedMatmul and QuantizedMatmulMinMax to explicitly notify which quantizedtype output would be produced by following activation function.
Change: 142073731
-rw-r--r--tensorflow/core/ops/math_ops.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/ops/math_ops.cc b/tensorflow/core/ops/math_ops.cc
index 9e692ed0bc..6a1c285dbf 100644
--- a/tensorflow/core/ops/math_ops.cc
+++ b/tensorflow/core/ops/math_ops.cc
@@ -2245,6 +2245,7 @@ REGISTER_OP("QuantizedMatMul")
.Attr("Toutput: quantizedtype = DT_QINT32")
.Attr("transpose_a: bool = false")
.Attr("transpose_b: bool = false")
+ .Attr("Tactivation: quantizedtype = DT_QUINT8")
.SetShapeFn([](InferenceContext* c) {
TF_RETURN_IF_ERROR(shape_inference::MatMulShape(c));
ShapeHandle unused;
@@ -2275,6 +2276,8 @@ min_b: The float value that the lowest quantized `b` value represents.
max_b: The float value that the highest quantized `b` value represents.
min_out: The float value that the lowest quantized output value represents.
max_out: The float value that the highest quantized output value represents.
+Tactivation: The type of output produced by activation function
+ following this operation.
)doc");