-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
pad_to_bounding_box
image ops (#18503)
* add: `pad_to_bounding_box` * update: format * update: use f string * update: rename to `pad_image` * update: rename arguments `offset_height` -> `top_padding` `offset_width` -> `left_padding` * add: `bottom_padding` and `right_padding` * update: remove `check_dims` * update: compute output shape for unbatched and batched inputs * add: dynamic shape test * add: static shape test * add: height & width both dynamic test * fix: height & width `None` test * update: remove residual`check_dims` * add: correctness test * fix: no `expand` attribute AttributeError: module 'absl.testing.parameterized' has no attribute 'expand' * fix: `.numpy()` bug AttributeError: 'numpy.ndarray' object has no attribute 'numpy' * update: `pad_image` -> `pad_images` * update: use tuple for shapes * update: remove `-` from 3D & 4D * update: `PadImage` -> `PadImages` * update: `image` -> `images` * update: systematic argument checking and inference * update: make cond more readable * update: if paddings `None` cond * update: print the values passed * update: show received shape * update: use `ops.shape` instead of `.shape` * update: show invalid padding values
- Loading branch information
Showing
2 changed files
with
291 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters