-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added support of halpPixelCenters to resizeNearestNeighbor op #4262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Ping!
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @lina128 and @pyu10055)
tfjs-core/src/ops/image/resize_nearest_neighbor.ts, line 41 at r1 (raw file):
* corners of images and resized images. If false, rescale by * `new_height / height`. Treat similarly the width dimension. * @param halfPixelCenters Defaults to `false`. Whether to assume pixel centers
sugg: Shall we use the same field description as TF? i.e. half_pixel_centers assumes pixels are of half the actual dimensions, and yields more accurate resizes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @lina128)
tfjs-core/src/ops/image/resize_nearest_neighbor.ts, line 41 at r1 (raw file):
Previously, lina128 (Na Li) wrote…
sugg: Shall we use the same field description as TF? i.e. half_pixel_centers assumes pixels are of half the actual dimensions, and yields more accurate resizes.
Where did you find that description? I am reusing the same param description from resizeBilinear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @pyu10055)
tfjs-core/src/ops/image/resize_nearest_neighbor.ts, line 41 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
Where did you find that description? I am reusing the same param description from resizeBilinear.
Got it. I found the description from tflite codebase in g3, sent you the link. Either description is fine by me as long as there's some consistency.
ResizeNearestNeighbor op supports half_pixel_centers param, which we have added support for resizeBilinear op recently.
https://www.tensorflow.org/api_docs/python/tf/raw_ops/ResizeNearestNeighbor?hl=en
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is