Skip to content

Commit edc54ab

Browse files
Update flux.jl
1 parent 0f9e463 commit edc54ab

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/solve/flux.jl

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,3 @@ function __solve(prob::OptimizationProblem, opt, data = DEFAULT_DATA;
7070
SciMLBase.build_solution(prob, opt, θ, x[1])
7171
# here should be build_solution to create the output message
7272
end
73-
74-
function Flux.update!(opt, xs::Flux.Zygote.Params, gs)
75-
Flux.update!(opt, xs[1], gs)
76-
end
77-
78-
@require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" begin
79-
function Flux.update!(x::AbstractArray, x̄::AbstractArray{<:ForwardDiff.Dual})
80-
x .-=
81-
end
82-
83-
function Flux.update!(x::AbstractArray, x̄)
84-
x .-= getindex.(ForwardDiff.partials.(x̄),1)
85-
end
86-
87-
function Flux.update!(opt, x, x̄)
88-
x .-= Flux.Optimise.apply!(opt, x, x̄)
89-
end
90-
91-
function Flux.update!(opt, x, x̄::AbstractArray{<:ForwardDiff.Dual})
92-
x .-= Flux.Optimise.apply!(opt, x, getindex.(ForwardDiff.partials.(x̄),1))
93-
end
94-
end

0 commit comments

Comments
 (0)