Commit 68411471 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TF Object Detection Team
Browse files

Fix explicit padding when pool residuals are used. Match the pool residual...

Fix explicit padding when pool residuals are used. Match the pool residual convolution to the depthwise convolution to ensure the output tensors of both are of the same size.

PiperOrigin-RevId: 370971019
parent 46aa3f66
......@@ -467,9 +467,11 @@ def multi_resolution_feature_maps(feature_map_layout, depth_multiplier,
stride=1,
scope=layer_name)
if pool_residual and pre_layer_depth == depth_fn(layer_depth):
if use_explicit_padding:
pre_layer = ops.fixed_padding(pre_layer, conv_kernel_size)
feature_map += slim.avg_pool2d(
pre_layer, [3, 3],
padding='SAME',
pre_layer, [conv_kernel_size, conv_kernel_size],
padding=padding,
stride=2,
scope=layer_name + '_pool')
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment