-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix a bug transform_matrix_offset_center
#855
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
Conversation
- calculation of offset: sign error
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.
Add the PR number in the Changelog 👍
@zsdonghao if it is good to you, you can approve & merge ;) |
tensorlayer/prepro.py
Outdated
@@ -1719,8 +1719,8 @@ def transform_matrix_offset_center(matrix, x, y): | |||
- See ``tl.prepro.rotation``, ``tl.prepro.shear``, ``tl.prepro.zoom``. | |||
|
|||
""" | |||
o_x = float(x) / 2 + 0.5 | |||
o_y = float(y) / 2 + 0.5 | |||
o_x = (x - 1) / 2 |
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.
In python2, it doesn't work.
Still need (x - 1) / 2.0
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.
Ah, it's my mistake!
Checklist
Motivation and Context
Description