Skip to content

Commit

Permalink
setup only on AbstractRules
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 14, 2022
1 parent 9a34140 commit fe19182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Lux"
uuid = "b2108857-7c20-44ae-9111-449ecde12c47"
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
version = "0.4.28"
version = "0.4.29"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fe19182

Please sign in to comment.