Skip to content

Commit cfc3e67

Browse files
committed
remove explicit type (not a fix)
1 parent 5063429 commit cfc3e67

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/rules.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,8 @@ function apply!(o::Rprop, state, x, dx)
166166
ℓ, Γ = o.ell, o.gamma
167167
g, η = state
168168

169-
T = eltype(dx)
170169
g, η = broadcast(g, η, dx) do g, η, dx
171-
g * dx > 0 ? (g, min* ℓ[2], Γ[2])) : g * dx < 0 ? (zero(T), max* ℓ[1], Γ[1])) : (g, η)
170+
g * dx > 0 ? (g, min* ℓ[2], Γ[2])) : g * dx < 0 ? (zero(dx), max* ℓ[1], Γ[1])) : (g, η)
172171
end
173172

174173
dx′ = @lazy η * sign(g)

test/rules.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ end
3939
@test iloss(rand(10, 10), w, w′) > 1
4040
st = Optimisers.setup(o, w)
4141
for t = 1:10^5
42-
x = rand(10,20)
42+
x = rand(10, 20)
4343
gs = loggradient(o)(w -> iloss(x, w, w′), w)
4444
st, w = Optimisers.update!(st, w, gs...)
4545
end

0 commit comments

Comments
 (0)