ankurhanda / gvnn

gvnn: Geometric Vision with Neural Networks
445 stars 71 forks source link

I want to use backward in test_warpingSO3.lua,but I don't no how to set the parameter about gradOutput? #28

Closed ixiaoli closed 5 years ago

ixiaoli commented 6 years ago

hi! @ankurhanda , I want to test the functionality of the backward,but I don't know how to set the gradOutput.I am aimlessly changing parameters,but it dosen't work.Can you tell me how I set the gradOutput that I could run the code smoothly.? Thank you very much!

ankurhanda commented 6 years ago

Have you seen this file https://github.com/ankurhanda/gvnn/blob/master/test.lua. You can use this as your sample to build off of it.

ixiaoli commented 6 years ago

thank you~ and I don't understand the meaning of this code. self.u0 = -1 + 2 (u0-1)/(self.width-1) self.v0 = -1 + 2 (v0-1)/(self.height-1) ,can you tell me? Thank you!

ankurhanda commented 6 years ago

you should read the spatial transformer paper. it is to make sure that the coordinates are [-1, 1]

ixiaoli commented 6 years ago

Thank you for your explanation. I now understand SO3 code, you say the paper is exponential map,But the actual result in the code is logarithmic mapping?like that
completeTransformation = completeTransformation + torch.cmul(sin_theta_div_theta_tensor,omega_skew) + torch.cmul(one_minus_cos_div_theta_sqr_tensor, omega_skew_sqr) Some information I found shows that the result of the exponential mapping may be not divided by theta and theta square.Maybe my understanding is too shallow。