Skip to content

Commit 0b9e656

Browse files
committed
relax rtol for nsf invertibility error in FLoat32
1 parent 977caaf commit 0b9e656

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/flow.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ end
7171
hdims = [32, 32]
7272
for T in [Float32, Float64]
7373
# Create a nsf
74-
@leaf MvNormal
7574
q₀ = MvNormal(zeros(T, dim), I)
75+
@leaf MvNormal
7676

7777
B = 5one(T)
7878
flow = NormalizingFlows.nsf(q₀, hdims, K, B, nlayers; paramtype=T)
@@ -94,8 +94,8 @@ end
9494
y, lj_fwd = Bijectors.with_logabsdet_jacobian(flow.transform, x)
9595
x_reconstructed, lj_bwd = Bijectors.with_logabsdet_jacobian(inverse(flow.transform), y)
9696

97-
@test x x_reconstructed rtol=1e-6
98-
@test lj_fwd -lj_bwd rtol=1e-6
97+
@test x x_reconstructed rtol=1e-4
98+
@test lj_fwd -lj_bwd rtol=1e-4
9999

100100
x_batch = rand(q₀, 10)
101101
y_batch, ljs_fwd = Bijectors.with_logabsdet_jacobian(flow.transform, x_batch)

0 commit comments

Comments
 (0)