aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/quantize
diff options
context:
space:
mode:
authorGravatar Suharsh Sivakumar <suharshs@google.com>2018-09-27 15:37:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-27 15:45:48 -0700
commit8f85a9de475f0acf0abef4fabc12943e2e487bf7 (patch)
treec0b2ca158bdcfa765fdd18185ab547b4f923a5dd /tensorflow/contrib/quantize
parentbdab0b3c111bbe1c9656fa2228f1a4d28df5a7bf (diff)
Do not specify dilation rate to depthwise conv2d.
PiperOrigin-RevId: 214848057
Diffstat (limited to 'tensorflow/contrib/quantize')
-rw-r--r--tensorflow/contrib/quantize/python/fold_batch_norms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/contrib/quantize/python/fold_batch_norms.py b/tensorflow/contrib/quantize/python/fold_batch_norms.py
index e5790a6e13..7575b1b6cd 100644
--- a/tensorflow/contrib/quantize/python/fold_batch_norms.py
+++ b/tensorflow/contrib/quantize/python/fold_batch_norms.py
@@ -418,10 +418,11 @@ def _CloneWithNewOperands(layer_op, input_tensor, weight_tensor,
transpose_b=layer_op.get_attr('transpose_b'),
name=new_layer_name)
elif layer_op.type == 'DepthwiseConv2dNative':
+ # We don't copy dilation rate because we reuse the input SpaceToBatch
+ # and create our own BatchToSpace operation below.
conv = nn.depthwise_conv2d(
input_tensor,
weight_tensor,
- rate=layer_op.get_attr('dilations'),
strides=layer_op.get_attr('strides'),
padding=layer_op.get_attr('padding'),
name=new_layer_name)