Skip to content

Commit

Permalink
fix: don't preserve structure in checks
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 14, 2024
1 parent dca6f85 commit bcf5f64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/contrib/contrib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using ChainRulesCore: ChainRulesCore
using Compat: @compat
using ConcreteStructs: @concrete
using FastClosures: @closure
using Functors: Functors, KeyPath, fmap_with_path, functor
using Functors: Functors, KeyPath, fmap_with_path, fmapstructure_with_path, functor
using Markdown: @doc_str
using Optimisers: Optimisers
using Random: AbstractRNG, Random
Expand Down
3 changes: 2 additions & 1 deletion src/contrib/debug.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ function check_nan_and_throw(x, str::AbstractString, layer, location::KeyPath)
return x
end

return fmap_with_path(nan_check, x)
fmapstructure_with_path(nan_check, x)
return
end

function debug_layer_impl(layer, x, ps, st, location, error_check, _)
Expand Down

0 comments on commit bcf5f64

Please sign in to comment.