ExaModels.jl

ExaModels.jl is an algebraic modeling and automatic differentiation tool in Julia Language, specialized for SIMD abstraction of nonlinear programs.

The upstream documentation is available at https://exanauts.github.io/ExaModels.jl/stable/.

Supported layers

ExaModels supports the following predictors:

Basic example

Use MathOptAI.add_predictor to embed various predictors into an ExaCore:

julia> using ExaModels, MathOptAI, Flux
julia> chain = Flux.Chain( Flux.Dense(2 => 2, Flux.relu), Flux.Scale(2), Flux.Dense(2 => 2, Flux.sigmoid), Flux.softmax, Flux.Dense(2 => 2, Flux.softplus), Flux.Dense(2 => 2, Flux.tanh), );
julia> core = ExaModels.ExaCore()An ExaCore Float type: ...................... Float64 Array type: ...................... Vector{Float64} Backend: ......................... Nothing number of objective patterns: .... 0 number of constraint patterns: ... 0
julia> x = ExaModels.variable(core, 2)Variable x ∈ R^{2}
julia> y, _ = MathOptAI.add_predictor(core, chain, x);
julia> yVariable x ∈ R^{2}
julia> coreAn ExaCore Float type: ...................... Float64 Array type: ...................... Vector{Float64} Backend: ......................... Nothing number of objective patterns: .... 0 number of constraint patterns: ... 21