better angle transformation
@@ -62,7 +62,8 @@ class AngleTransform(tr.Transform):
return np.array([np.sin(x), np.cos(x)])
def jacobian_det(self, y):
- return -0.5*tt.sum(tt.square(y))
+ sm = tt.sum(tt.square(y), axis=0)
+ return tt.log(sm) - 0.5*sm
angle = AngleTransform()
