Closed YuhengZhi closed 6 days ago
The current conversions from wp.quaternion to wp.vec4 would stop gradients from properly propagating. This has caused the issue mentioned in #392.
Instead of
out_v = wp.vec4() out_v[0] = out_q[3] out_v[1] = out_q[0] out_v[2] = out_q[1] out_v[3] = out_q[2]
, this commit does the conversion from quaterniom to vec4 as
out_v = wp.vec4(out_q[3], out_q[0], out_q[1], out_q[2])
which seems to produce correct results in the example used in #392 .
A few other wp.kernel's in the same file were using the same conversion method, so are all modified accordingly.
wp.kernel
Fixed missing/extra None's in a few backward functions, mentioned in #382 .
None
backward
Please feel free to let me know if there are any issues.
Thanks for the fix!
The current conversions from wp.quaternion to wp.vec4 would stop gradients from properly propagating. This has caused the issue mentioned in #392.
Instead of
, this commit does the conversion from quaterniom to vec4 as
which seems to produce correct results in the example used in #392 .
A few other
wp.kernel
's in the same file were using the same conversion method, so are all modified accordingly.Fixed missing/extra
None
's in a fewbackward
functions, mentioned in #382 .Please feel free to let me know if there are any issues.