bayesiains / nflows

Normalizing flows in PyTorch
MIT License
849 stars 118 forks source link

Allow scales >1.001 in AffineCouplingTransform (fixes #49) #52

Closed dennisprangle closed 2 years ago

dennisprangle commented 2 years ago

I've run unit tests. On my first attempt there was one failure (see below) which didn't seem relevant to this change, and I couldn't reproduce this on rerunning the tests (i.e. on trying the unit tests again they all passed)

FAIL: test_forward_inverse_are_consistent (transforms.nonlinearities_test.TestPiecewiseCDF) (transform=PiecewiseLinearCDF())
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dennis/git/nflows/tests/transforms/nonlinearities_test.py", line 63, in test_forward_inverse_are_consistent
    self.assert_forward_inverse_are_consistent(transform, inputs)
  File "/home/dennis/git/nflows/tests/transforms/transform_test.py", line 25, in assert_forward_inverse_are_consistent
    self.assertEqual(logabsdet, torch.zeros(inputs.shape[:1]))
AssertionError: The tensors are different!

----------------------------------------------------------------------
dennisprangle commented 2 years ago

Thanks for the suggestions, I've tried to incorporate them into the new commits. Let me know what you think.

arturbekasov commented 2 years ago

Yep, this look great to me, thanks a lot!