Internals

NeuralLyapunov.phi_to_netFunction
phi_to_net(phi, θ[; idx])

Return the network as a function of state alone.

Arguments

  • phi: the neural network, represented as phi(x, θ) if the neural network has a single output, or a Vector of the same with one entry per neural network output.
  • θ: the parameters of the neural network; If the neural network has multiple outputs, θ[:φ1] should be the parameters of the first neural network output, θ[:φ2] the parameters of the second (if there are multiple), and so on. If the neural network has a single output, θ should be the parameters of the network.
  • idx: the neural network outputs to include in the returned function; defaults to all and only applicable when phi isa Vector.
source
NeuralLyapunov.NeuralLyapunovBenchmarkLoggerType
NeuralLyapunovBenchmarkLogger(losses, iterations)

A simple logger for tracking the (full weighted) loss during training using NeuralPDE.

Fields

  • losses::Vector{<:Real}: A vector to store the loss values.
  • iterations::Vector{<:Integer}: A vector to store the corresponding iteration numbers.

Constructors

  • NeuralLyapunovBenchmarkLogger{T1, T2}() where {T1<:Real, T2<:Integer}: Creates an empty logger with specified types for losses and iterations.
  • NeuralLyapunovBenchmarkLogger{T}() where {T}: Creates an empty logger with specified type for losses and Int64 for iterations.
  • NeuralLyapunovBenchmarkLogger(): Creates an empty logger with Float64 for losses and Int64 for iterations.
source