Skip to content

Commit b96edc6

Browse files
bug fix for the derivative of Piecewise_positive()
1 parent 63f5b94 commit b96edc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mappings.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ f_pw_pos_inv(y) = ifelse.(y .> 1, y .- one(eltype(y)), one(eltype(y)) .- one(elt
9292
function ChainRulesCore.rrule(::typeof(f_pw_pos), x)
9393
Y = f_pw_pos(x)
9494
function aux_pullback(barx)
95-
return zero(eltype(Y)), barx .* f_pow_pos_grad(x)
95+
return zero(eltype(Y)), barx .* f_pw_pos_grad(x)
9696
end
9797
return Y, aux_pullback
9898
end

0 commit comments

Comments
 (0)