Skip to content

Commit

Permalink
Fixed typo in PositiveDefinite test and removed == from test in f…
Browse files Browse the repository at this point in the history
…avor of comparing absolute difference with a small threshold
  • Loading branch information
nicholaskl97 committed Jan 9, 2025
1 parent a4e044d commit 0445dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/layer_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ end
z, _ = model(x, ps, st.model)
z0, _ = model(x0, ps, st.model)
y2 = sum(abs2, z .- z0; dims = 1) .+ sum(abs2, x .- x0; dims = 1)
@test all(y .== y2)
@test maximum(abs, y - y2) < 1.0f-8

@jet pd(x, ps, st)

__f = (x, ps) -> sum(first(pd(x, ps, st)))
@test_gradients(__f, x, ps; atol=1.0fe-3, rtol=1.0fe-3)
@test_gradients(__f, x, ps; atol=1.0f-3, rtol=1.0f-3)
end
end

0 comments on commit 0445dd8

Please sign in to comment.