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

Fixes for test_warp.lua #169

Merged
merged 2 commits into from
May 26, 2016
Merged

Fixes for test_warp.lua #169

merged 2 commits into from
May 26, 2016

Conversation

TimZaman
Copy link
Contributor

Hi, two commits
(1) Fixes the test_warp scaling bug
(2) Fixes indentation in the rotation test script (that i verifies works correctly).

There is a mistake in test_warp.lua. Try a rotation of 0 degrees and you will see that it will scale ever slightly, by around one pixel. The following thing describes the problem and shows the fix of the PR:

Current:

current_test_warp

PR:

pr_test_warp

Do not look at the colors themselves, the .GIF format might have changed them.
Look how in the current state the geometry changes with respect to the source image. And look how the geometry stays exactly on-pixel.
Luckily little harm is done as this is a test script, but this is the real only documentation that is to be found about the warp functionality, it's good to keep it correctly. I found this bug because I was implementing the warp functionality and found the way that it was used here to be erroneous.
Great package! Keep it up.

@soumith
Copy link
Member

soumith commented May 26, 2016

Thanks! :)

@soumith soumith merged commit 8b285fc into torch:master May 26, 2016
@TimZaman TimZaman mentioned this pull request May 26, 2016
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants