def test_compose(self):
// 1. Composition by identity, on the right
// Expect the original transformation
rot_vec = self.so3_group.random_uniform()
mat = self.so3_group.matrix_from_rotation_vector(rot_vec)
result = self.group.compose(mat, self.group.identity)
expected = mat
After Change
def test_compose(self):
// 1. Composition by identity, on the right
// Expect the original transformation
rot_vec = tf.convert_to_tensor([0.2, -0.1, 0.1])
mat = self.so3_group.matrix_from_rotation_vector(rot_vec)
result = self.group.compose(mat, self.group.identity)
expected = mat
expected = helper.to_matrix(mat)
with self.test_session():
self.assertAllClose(gs.eval(result), gs.eval(expected))