aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/quantization
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-09-08 08:39:43 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-09-08 09:47:41 -0700
commit0acc22fe85b18458d80dfd93f312f56e6941300e (patch)
tree16d26d70893dee940fbbeb3bdf207d6f0935b65f /tensorflow/contrib/quantization
parent6dc9d4b70a4df90d2ab099af04df6a365af37d5f (diff)
Convert ops in contrib, parsing_ops, and random_ops to use C++ shape functions.
Change: 132565142
Diffstat (limited to 'tensorflow/contrib/quantization')
-rw-r--r--tensorflow/contrib/quantization/python/nn_ops.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tensorflow/contrib/quantization/python/nn_ops.py b/tensorflow/contrib/quantization/python/nn_ops.py
index 33af3c1e2c..122d93fd23 100644
--- a/tensorflow/contrib/quantization/python/nn_ops.py
+++ b/tensorflow/contrib/quantization/python/nn_ops.py
@@ -77,12 +77,7 @@ def _QuantizedMaxPoolShape(op):
tensor_shape.scalar()]
-@ops.RegisterShape("QuantizedRelu")
-@ops.RegisterShape("QuantizedRelu6")
-@ops.RegisterShape("QuantizedReluX")
-@ops.RegisterShape("QuantizeDownAndShrinkRange")
-def _QuantizedSameShape(op):
- unused_min = op.inputs[1].get_shape().merge_with(tensor_shape.scalar())
- unused_max = op.inputs[2].get_shape().merge_with(tensor_shape.scalar())
- return [op.inputs[0].get_shape(), tensor_shape.scalar(),
- tensor_shape.scalar()]
+ops.RegisterShape("QuantizedRelu")(common_shapes.call_cpp_shape_fn)
+ops.RegisterShape("QuantizedRelu6")(common_shapes.call_cpp_shape_fn)
+ops.RegisterShape("QuantizedReluX")(common_shapes.call_cpp_shape_fn)
+ops.RegisterShape("QuantizeDownAndShrinkRange")(common_shapes.call_cpp_shape_fn)