Skip to content

Commit 1190149

Browse files
YichengDWumcabbott
andauthored
Update src/rules.jl
Co-authored-by: Michael Abbott <[email protected]>
1 parent 62598ed commit 1190149

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rules.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ function apply!(o::Rprop, state, x, dx)
173173

174174
η₁ = clamp.(η₀ .* signs, Γ[1], Γ[2])
175175

176-
g₁ = copy(dx)
177-
g₁[signs .== ℓ[1]] .= zero(eltype(g₁))
176+
@.. g = (signs == ℓ[1]) * dx
178177

179178
dx′ = @lazy η₁ * sign(g₁)
180179

0 commit comments

Comments
 (0)