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
Loading
Please sign in to comment