Skip to content

Commit

Permalink
Did suggested changes to dae_solve and ode_solve
Browse files Browse the repository at this point in the history
  • Loading branch information
hippyhippohops committed Jul 14, 2024
1 parent 7d26f4c commit 08a02c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
7 changes: 0 additions & 7 deletions src/dae_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ function inner_loss(phi::ODEPhi{C, T, U}, f, autodiff::Bool, t::AbstractVector,
sum(abs2, loss) / length(t)
end

#=
function inner_loss(phi::ODEPhi{C, T, U}, f, autodiff::Bool, t::Number, θ,
p, differential_vars::AbstractVector) where {C, T, U}
sum(abs2, dfdx(phi, t, θ, autodiff,differential_vars) .- f(phi(t, θ), t))
end
=#

function inner_loss(phi::ODEPhi{C, T, U}, f, autodiff::Bool, t::Number, θ,
p, differential_vars::AbstractVector) where {C, T, U}
dphi = dfdx(phi, t, θ, autodiff,differential_vars)
Expand Down
3 changes: 0 additions & 3 deletions src/ode_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ end
Representation of the loss function, parametric on the training strategy `strategy`.
"""

function generate_loss(strategy::QuadratureTraining, phi, f, autodiff::Bool, tspan, p,
batch, param_estim::Bool)
integrand(t::Number, θ) = abs2(inner_loss(phi, f, autodiff, t, θ, p, param_estim))
Expand Down Expand Up @@ -306,7 +305,6 @@ function generate_loss(
end



function evaluate_tstops_loss(phi, f, autodiff::Bool, tstops, p, batch, param_estim::Bool)
function loss(θ, _)
if batch
Expand All @@ -322,7 +320,6 @@ function generate_loss(strategy::QuasiRandomTraining, phi, f, autodiff::Bool, ts
error("QuasiRandomTraining is not supported by NNODE since it's for high dimensional spaces only. Use StochasticTraining instead.")
end


struct NNODEInterpolation{T <: ODEPhi, T2}
phi::T
θ::T2
Expand Down

0 comments on commit 08a02c4

Please sign in to comment.