File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
function frule ((_, Δ1), :: typeof (zero), x)
10
10
var"∂f/∂x" = ZeroTangent ()
11
- (zero (x), Δ1 * var"∂f/∂x" )
11
+ return (zero (x), Δ1 * var"∂f/∂x" )
12
12
end
13
13
14
14
function rrule (:: typeof (zero), x)
15
15
Ω = zero (x)
16
16
proj_x = ProjectTo (x)
17
17
var"∂f/∂x" = ZeroTangent ()
18
18
pullback (Δ1) = (NoTangent (), proj_x (conj (var"∂f/∂x" ) * Δ1))
19
- (Ω, pullback)
19
+ return (Ω, pullback)
20
20
end
21
21
22
22
# `one`
23
23
24
24
function frule ((_, Δ1), :: typeof (one), x)
25
25
var"∂f/∂x" = ZeroTangent ()
26
- (one (x), Δ1 * var"∂f/∂x" )
26
+ return (one (x), Δ1 * var"∂f/∂x" )
27
27
end
28
28
29
29
function rrule (:: typeof (one), x)
30
30
Ω = one (x)
31
31
proj_x = ProjectTo (x)
32
32
var"∂f/∂x" = ZeroTangent ()
33
33
pullback (Δ1) = (NoTangent (), proj_x (conj (var"∂f/∂x" ) * Δ1))
34
- (Ω, pullback)
34
+ return (Ω, pullback)
35
35
end
36
36
37
37
# `adjoint`
You can’t perform that action at this time.
0 commit comments