コード例 #1
0
 def test_translations_to_projective_transforms(self):
     translation = tf.constant([-1, -1], dtype=tf.float32)
     transform = translate_ops.translations_to_projective_transforms(
         translation)
     self.assertAllEqual(self.evaluate(transform),
                         [[1, 0, 1, 0, 1, 1, 0, 0]])
コード例 #2
0
def test_translations_to_projective_transforms():
    translation = tf.constant([-1, -1], dtype=tf.float32)
    transform = translate_ops.translations_to_projective_transforms(translation)
    np.testing.assert_equal(transform.numpy(), [[1, 0, 1, 0, 1, 1, 0, 0]])