From fe19182488ebe951f9ceefb8a9fc510f851d3177 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 14 Oct 2022 12:26:13 -0400 Subject: [PATCH] setup only on AbstractRules --- Project.toml | 2 +- src/utils.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index ce99a0e9f7..3fd2ba87f4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Lux" uuid = "b2108857-7c20-44ae-9111-449ecde12c47" authors = ["Avik Pal and contributors"] -version = "0.4.28" +version = "0.4.29" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/utils.jl b/src/utils.jl index 71cc0db4f8..d1a281d593 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -143,7 +143,7 @@ function Functors.functor(::Type{<:ComponentArray}, c) ComponentArray end -Optimisers.setup(opt, ps::ComponentArray) = Optimisers.setup(opt, getdata(ps)) +Optimisers.setup(opt::AbstractRule, ps::ComponentArray) = Optimisers.setup(opt, getdata(ps)) function Optimisers.update(tree, ps::ComponentArray, gs::ComponentArray) tree, ps_new = Optimisers.update(tree, getdata(ps), getdata(gs))