Skip to content
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

Translate ops added and its test script #320

Merged
merged 13 commits into from
Jul 5, 2019

Conversation

sayoojbk
Copy link
Contributor

The translate ops and the test scripts have been added for the issue #25

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@sayoojbk
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sayoojbk , thanks for the contribution here! I drop some comments below. Some files should be modified too:

  1. BUILD
  2. __init__.py
  3. README.md

If you want to be a submodule maintainer, please feel free to drop your name on README

There are some errors and wrong formats so do not forget to run make to execute sanity check and tests before committing the codes. Thanks for the contribution again :P

tensorflow_addons/image/translate_ops_test.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops_test.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops_test.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops_test.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops.py Outdated Show resolved Hide resolved
tensorflow_addons/image/translate_ops_test.py Outdated Show resolved Hide resolved
Copy link
Contributor Author

@sayoojbk sayoojbk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made most of the changes that you suggested but not sure about this one :#320 (comment) . Like do I need to remove the session from this and keep this function in a Python function format.

@kyleabeauchamp
Copy link
Contributor

I think the comment was just suggesting that you delete the line with self.cached_session():, which you appear to have done.

@sayoojbk
Copy link
Contributor Author

I think the comment was just suggesting that you delete the line with self.cached_session():, which you appear to have done.

Ohh thanks and are there any other changes you think to be made yet.

@WindQAQ WindQAQ self-requested a review July 1, 2019 16:13
Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sayoojbk , LGTM! Only some minor changes and a unit test for translations_to_projective_transforms are needed.

@@ -8,6 +8,8 @@
| distort_image_ops | @WindQAQ | windqaq@gmail.com |
| filters | @Mainak431 | mainakdutta76@gmail.com |
| transform_ops | @mels630 | mels630@gmail.com |
| translate_ops | @sayoojbk | sayoojbk@gmail.com |
| translations_to_projective_transforms | @sayoojbk | sayoojbk@gmail.com |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line :P

@@ -8,6 +8,8 @@
| distort_image_ops | @WindQAQ | windqaq@gmail.com |
| filters | @Mainak431 | mainakdutta76@gmail.com |
| transform_ops | @mels630 | mels630@gmail.com |
| translate_ops | @sayoojbk | sayoojbk@gmail.com |
| translations_to_projective_transforms | @sayoojbk | sayoojbk@gmail.com |

## Components
| Submodule | Image Processing Function | Reference |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to add some rows to this table:

| translate_ops | translate | |
| translate_ops | translations_to_projective_transforms | |

Please put them alphabetically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added them alphabetically and removed the line containing the name I added.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I mean we only have to remove this line

| translations_to_projective_transforms | @sayoojbk	| sayoojbk@gmail.com |

self.assertAllEqual(
self.evaluate(image_translated),
[[1, 0, 1, 0], [0, 1, 0, 0], [1, 0, 1, 0], [0, 0, 0, 0]])

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind doing a unit test for translations_to_projective_transforms? Sorry about not requesting this earily. I am not aware that it is also a public API too.

@SSaishruthi
Copy link
Contributor

@WindQAQ
I think the name has been changed. Is that me you are pointing to?

@WindQAQ
Copy link
Member

WindQAQ commented Jul 1, 2019

@SSaishruthi Sorry about that... I mean @sayoojbk instead.

Copy link
Member

@WindQAQ WindQAQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for the contribution again!

@WindQAQ WindQAQ merged commit dfd0c66 into tensorflow:master Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants