Example #1
0
 def test_cond_planar_shapes(self):
     observed_dim = 3
     for shape in [(3, ), (3, 4), (3, 4, 2)]:
         input_dim = shape[-1]
         z = torch.rand(observed_dim)
         transform = T.conditional_planar(input_dim, observed_dim)
         self._test_shape(shape, transform.condition(z))
Example #2
0
 def test_cond_planar_jacobians(self):
     observed_dim = 3
     for input_dim in [2, 5, 10]:
         z = torch.rand(observed_dim)
         transform = T.conditional_planar(input_dim, observed_dim)
         self._test_jacobian(input_dim, transform.condition(z))