From 811629aed466db32eeefbd60783e199d2fe154a9 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" <gardener@tensorflow.org> Date: Wed, 14 Dec 2016 15:39:14 -0800 Subject: [PATCH] Add Tactivation attribute for QuantizedMatmul and QuantizedMatmulMinMax to explicitly notify which quantizedtype output would be produced by following activation function. Change: 142073731 --- tensorflow/core/ops/math_ops.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tensorflow/core/ops/math_ops.cc b/tensorflow/core/ops/math_ops.cc index 9e692ed0bc7..6a1c285dbf9 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");