Skip to content

Commit

Permalink
change fields order
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Dec 11, 2024
1 parent ba7cafc commit 3c046a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -531,14 +531,14 @@ Implemented as an [`OptimiserChain`](@ref) of [`Adam`](@ref) and [`WeightDecay`]
struct AdamW{T1,T2,T3,T4} <: AbstractRule
eta::T1
beta::T2
epsilon::T3
lambda::T4
epsilon::T3
couple::Bool
end

function AdamW(η, β = (0.9, 0.999), λ = 0.0, ϵ = 1e-8; couple::Bool = true)
η < 0 && throw(DomainError(η, "the learning rate cannot be negative"))
AdamW(η, β, ϵ, λ, couple)
AdamW(η, β, λ, ϵ, couple)
end

AdamW(; eta = 0.001, beta = (0.9, 0.999), lambda= 0.0, epsilon = 1e-8, kw...) =
Expand Down

0 comments on commit 3c046a1

Please sign in to comment.