Commit 7a056bf8 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Adds python gradients for ScaleAndTranslate ops, which are now used internal...

Adds python gradients for ScaleAndTranslate ops, which are now used internal by tf.resize_images_v2 op.
Also changes behavior of ScaleAndTranslateOp when sampling location is near borders, before if any part of the scaled sampling kernel was inside the input image a result would be returned, now a result will be returned only if the sampling location is inside the input image. This avoids complicated edge cases where only sampling contributions with weight zero are inside the image, which are then normalized causing large gradients.
Fixes bug in ScaleAndTranslateOpGrad when output pixel has no contribution from input.
This change won't affect any current usage in resize.
Correctly pass antialias attribute to ScaleAndTranslateOpGrad.

PiperOrigin-RevId: 238576377
parent ce6a60a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment