Commit beba9e6
Switch from TFA resampler op to TFA interpolate_bilinear.
Maintaining the custom resampler op is a maintenance headache that requires aligning the versions of TFA and TFG for the opensource releases (e.g., #650). The interpolate_bilinear function is a pure-TF op that is likely somewhat slower, but has no maintenance problems. Using pure-TF ops also allows using higher-order derivatives and tf.ForwardAccumulator with the transform.sample function.
The implemented border behavior of interpolate_bilinear is DUPLICATE, whereas resampler is ZERO, so the sample function changes slightly to pad the image with zeros when BorderType.ZERO is requested.
PiperOrigin-RevId: 4139718981 parent 38771b1 commit beba9e6
1 file changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
0 commit comments