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, Fluxjulia> 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(; concrete = Val(true))An ExaCore Float type: ...................... Float64 Array type: ...................... Vector{Float64} Backend: ......................... Nothing number of objective patterns: .... 0 number of constraint patterns: ... 0julia> core, x = ExaModels.add_var(core, 2)(An ExaCore Float type: ...................... Float64 Array type: ...................... Vector{Float64} Backend: ......................... Nothing number of objective patterns: .... 0 number of constraint patterns: ... 0 , Variable x ∈ R^{2} )julia> (core, 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: ... 17