Skip to content

Commit

Permalink
Remove old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnabergoj committed Jun 23, 2024
1 parent 39586c8 commit ea1d5c5
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions test/test_squeeze_bijection.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,3 @@ def test_reconstruction(batch_shape, channels, height, width):
assert torch.allclose(x_reconstructed, x)
assert torch.allclose(log_det_forward, torch.zeros_like(log_det_forward))
assert torch.allclose(log_det_forward, log_det_inverse)


def test_efficient_forward():
x = torch.tensor([
[1, 2, 5, 6],
[3, 4, 7, 8],
[9, 10, 13, 14],
[11, 12, 15, 16]
])[None, None]
layer = Squeeze(event_shape=x.shape[-3:])
z, log_det_forward = layer.forward(x)
z2, log_det_forward2 = layer.forward2(x)
assert torch.allclose(z, z2)


def test_efficient_inverse():
x = torch.tensor([
[1, 2, 5, 6],
[3, 4, 7, 8],
[9, 10, 13, 14],
[11, 12, 15, 16]
])[None, None]
layer = Squeeze(event_shape=x.shape[-3:])
z, log_det_forward = layer.forward(x)

xr, _ = layer.inverse2(z)

assert torch.allclose(x, xr)

0 comments on commit ea1d5c5

Please sign in to comment.