Skip to content

Commit 275b93b

Browse files
authored
formatting
1 parent 9972f36 commit 275b93b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rulesets/Base/base.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@
88

99
function frule((_, Δ1), ::typeof(zero), x)
1010
var"∂f/∂x" = ZeroTangent()
11-
(zero(x), Δ1 * var"∂f/∂x")
11+
return (zero(x), Δ1 * var"∂f/∂x")
1212
end
1313

1414
function rrule(::typeof(zero), x)
1515
Ω = zero(x)
1616
proj_x = ProjectTo(x)
1717
var"∂f/∂x" = ZeroTangent()
1818
pullback(Δ1) = (NoTangent(), proj_x(conj(var"∂f/∂x") * Δ1))
19-
(Ω, pullback)
19+
return (Ω, pullback)
2020
end
2121

2222
# `one`
2323

2424
function frule((_, Δ1), ::typeof(one), x)
2525
var"∂f/∂x" = ZeroTangent()
26-
(one(x), Δ1 * var"∂f/∂x")
26+
return (one(x), Δ1 * var"∂f/∂x")
2727
end
2828

2929
function rrule(::typeof(one), x)
3030
Ω = one(x)
3131
proj_x = ProjectTo(x)
3232
var"∂f/∂x" = ZeroTangent()
3333
pullback(Δ1) = (NoTangent(), proj_x(conj(var"∂f/∂x") * Δ1))
34-
(Ω, pullback)
34+
return (Ω, pullback)
3535
end
3636

3737
# `adjoint`

0 commit comments

Comments
 (0)