fixes #164
This commit is contained in:
parent
066cb45a38
commit
820cd3ae42
|
@ -130,8 +130,8 @@ LinAlg.dot(xs::AbstractVector, ys::TrackedVector) = track(dot, xs, ys)
|
|||
LinAlg.dot(xs::TrackedVector, ys::AbstractVector) = track(dot, xs, ys)
|
||||
|
||||
function back(::typeof(dot), Δ, xs, ys)
|
||||
@back(xs, Δ.*ys)
|
||||
@back(ys, Δ.*xs)
|
||||
@back(xs, Δ.*data(ys))
|
||||
@back(ys, Δ.*data(xs))
|
||||
end
|
||||
|
||||
# Hacks to get std working
|
||||
|
|
|
@ -45,6 +45,7 @@ end
|
|||
@test gradtest(x -> std(x, 1), rand(5,5))
|
||||
|
||||
@test gradtest((x, y) -> x .* y, rand(5), rand(5))
|
||||
@test gradtest(dot, rand(5), rand(5))
|
||||
|
||||
@test gradtest(rand(5)) do x
|
||||
y = x.^2
|
||||
|
|
Loading…
Reference in New Issue