diff --git a/Project.toml b/Project.toml index 145a1f2..538f627 100644 --- a/Project.toml +++ b/Project.toml @@ -13,10 +13,12 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [weakdeps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" +Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" [extensions] OptimisersAdaptExt = ["Adapt"] OptimisersEnzymeCoreExt = "EnzymeCore" +OptimisersReactantExt = "Reactant" [compat] Adapt = "4" diff --git a/ext/OptimisersReactantExt.jl b/ext/OptimisersReactantExt.jl new file mode 100644 index 0000000..ee764c8 --- /dev/null +++ b/ext/OptimisersReactantExt.jl @@ -0,0 +1,8 @@ +module OptimisersReactantExt + +import Optimisers +import Reactant + +Optimisers._eps(T::Type{<:Reactant.TracedRNumber{<:AbstractFloat}}, e) = T(e) + +end