Skip to content

Commit 8c0ba95

Browse files
committed
Remove adjoints of Euclidean and SqEuclidean
1 parent a5bcc63 commit 8c0ba95

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/zygote_adjoints.jl

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
@adjoint function evaluate(s::SqEuclidean, x::AbstractVector, y::AbstractVector)
2-
δ = x .- y
3-
sum(abs2, δ), Δ -> begin
4-
= (2 * Δ) .* δ
5-
(nothing, x̄, -x̄)
6-
end
7-
end
8-
9-
@adjoint function evaluate(s::Euclidean, x::AbstractVector, y::AbstractVector)
10-
D = x.-y
11-
δ = sqrt(sum(abs2,D))
12-
δ, Δ -> begin
13-
= Δ .* D /+ eps(δ))
14-
(nothing, x̄, -x̄)
15-
end
16-
end
17-
181
@adjoint function evaluate(s::DotProduct, x::AbstractVector, y::AbstractVector)
192
dot(x,y), Δ -> begin
203
(nothing, Δ.*y, Δ.*x)

0 commit comments

Comments
 (0)