-
Notifications
You must be signed in to change notification settings - Fork 951
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
ThinPlateSpline is bugged, proposed fix #896
Comments
Thanks, you're right. It seems this isn't covered by the tests. Did you have a test case that exposed the bug, or did you just notice it while reading the code? (For a PR, we should include a test.) |
Hi I noticed this when playing with the code and copy-pasting parts of it and testing how it works. My usage of the TPS was not the canonical Lasagne usage with layers and objects, so it is not so useful for you. |
Looking at https://github.com/Lasagne/Lasagne/blob/master/lasagne/layers/special.py
function _get_transformed_points_tps
distances = T.switch(T.isnan(log_r_2), r_2 * log_r_2, 0.)
This is a bug -- should be actually T.switch(T.isnan(r_2 * log_r_2), 0., r_2 * log_r_2) because this is the correct order Theano processes switch statement
The fix is very easy -- can somebody make a pull request for this?
The text was updated successfully, but these errors were encountered: