Skip to content

Commit

Permalink
restrict AdamW's fields to Float64 (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello authored Dec 12, 2024
1 parent 669798c commit 5f2680a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,11 @@ Implemented as an [`OptimiserChain`](@ref) of [`Adam`](@ref) and [`WeightDecay`]
The previous rule, which is closer to the original paper, can be obtained by setting `AdamW(..., couple=false)`.
See [this issue](https://github.com/FluxML/Flux.jl/issues/2433) for more details.
"""
struct AdamW{T1,T2,T3,T4} <: AbstractRule
eta::T1
beta::T2
lambda::T4
epsilon::T3
struct AdamW <: AbstractRule
eta::Float64
beta::Tuple{Float64, Float64}
lambda::Float64
epsilon::Float64
couple::Bool
end

Expand Down

0 comments on commit 5f2680a

Please sign in to comment.