-
Notifications
You must be signed in to change notification settings - Fork 615
Linear transformation #1813
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
Linear transformation #1813
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.
Thanks for contribution! I would think this is not a necessary function. Besides the function calls about shape (to_4D_image, from_4D_image, etc) and casting, it is just an one line wrapper of a * image + b
.
Also, when doing testing, we should make the tolerance atol
and rtol
as small as possible. In this case, 0.006 might be too large in my opinion.
It is really helpful that we can open an issue to talk about why we need it, why we should include this function before creating an PR.
Thanks.
cc @tensorflow/sig-addons-maintainers
@WindQAQ I can modify this function if required. |
So maybe we should discuss more about this kind of single-lined wrapper. Personally, I discourage the single-lined wrapper because it adds more testing codes than "real" source codes. @gabrieldemarmiesse @seanpmorgan @Squadrick @bhack Hi, thoughts on this?
Just leave the argument default. However, for example, if you are trying to test against scipy's implementation, we might want to make tolerance larger because the underlying implementation of scipy uses double aka float64 to compute, which produces more precise results. In this case, we can adjust the tolerance to acceptable value say 1e-6 or 1e-5 etc. |
For |
We really need to clean up #1333 and #1353, those issues were made without inspecting too much the list of said transformations or how it was phrased, and now contributors are being confused about why we need those and what form it should take. We are wasting contributors' time and that's not good. I'll try to take a look at it tomorrow and cleanup / clarify those issues. Apologies @ghosalsattam we should have been more careful about the issues and what was said in them. We need those transformations for randaugment and autoaugment, but we don't need to expose all of them with a public API. |
This PR is aimed at Linear Transformation of images.