Functions

RobustNeuralNetworks.direct_to_explicitFunction
direct_to_explicit(ps::AbstractRENParams{T}, return_h=false) where T

Convert direct parameterisation of RENs to explicit parameterisation.

Uses the parameterisation encoded in ps to construct an ExplicitRENParams object that naturally satisfies a set of user-defined behavioural constraints.

Arguments

  • ps::AbstractRENParams: Direct parameterisation with behavioural constraints to convert to an explicit parameterisation of REN (eg: GeneralRENParams).

  • return_h::Bool=false: Whether to return the H-matrix directly (see Revay et al. (2021)). Useful for debugging or model analysis. If false, function returns an object of type ExplicitRENParams{T}.

See also GeneralRENParams, ContractingRENParams, LipschitzRENParams, PassiveRENParams.

direct_to_explicit(ps::AbstractRENParams{T}) where T

Convert direct parameterisation of LBDNs to explicit parameterisation.

Uses the parameterisation encoded in ps to construct an ExplicitLBDNParams object that naturally respects a user-defined Lipschitz bound.

Arguments

  • ps::AbstractLBDNParams: Direct parameterisation of an LBDN to convert to an explicit parameterisation for model evaluation (eg: DenseLBDNParams).

See also DenseLBDNParams.

RobustNeuralNetworks.get_lipschitzFunction
get_lipschitz(model)

Extract Lipschitz bound from a Lipschitz-bounded model

Returns Lipschitz bound as a float. Function only works on the following types:

  • LBDN and DiffLBDN
  • DenseLBDNParams and DirectLBDNParams
  • LipschitzRENParams
RobustNeuralNetworks.init_statesFunction
init_states(m::AbstractREN, nbatches; rng=nothing)

Return matrix of (nbatches) state vectors of a REN initialised as zeros.

RobustNeuralNetworks.set_output_zero!Function
set_output_zero!(m::AbstractRENParams)

Set output map of a REN to zero.

If the resulting model is called with

ren = REN(m)
x1, y = ren(x, u)

then y = 0 for any x and u.

set_output_zero!(m::AbstractLBDNParams)

Set output map of an LBDN to zero.

If the resulting model is called with

lbdn = LBDN(m)
y = lbdn(u)

then y = 0 for any u.