# \[ANN\] ONNXRunTime.jl

**URL:** <https://discourse.julialang.org/t/ann-onnxruntime-jl/68978>\
**Category:** Package Announcements\
**Tags:** package, announcement, machine-learning\
**Created:** [September 30, 2021, 7:20am UTC](https://discourse.julialang.org/t/ann-onnxruntime-jl/68978 "2021-09-30T07:20:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [September 30, 2021, 7:20am UTC](https://discourse.julialang.org/t/ann-onnxruntime-jl/68978/1 "2021-09-30T07:20:02Z")

</div>

I am happy to announce [ONNXRunTime.jl](https://github.com/jw3126/ONNXRunTime.jl). ONNX is a file format for saving neural networks. [ONNXRunTime.jl](https://github.com/jw3126/ONNXRunTime.jl) is a wrapper around [onnxruntime](https://github.com/microsoft/onnxruntime) and allows loading ONNX files and using them for inference. For instance:

```julia

julia> import ONNXRunTime as OX

julia> path = OX.testdatapath("increment2x3.onnx"); # path to a toy model

julia> model = OX.load_inference(path);

julia> input = Dict("input" => randn(Float32,2,3))
Dict{String, Matrix{Float32}} with 1 entry:
  "input" => [1.68127 1.18192 -0.474021; -1.13518 1.02199 2.75168]

julia> model(input)
Dict{String, Matrix{Float32}} with 1 entry:
  "output" => [2.68127 2.18192 0.525979; -0.135185 2.02199 3.75168]

```

For GPU usage simply do:

```julia
pkg> add CUDA

julia> import CUDA

julia> model = OX.load_inference(path, execution_provider=:cuda);

```

There is also a low level API, that mirrors the official C-API.
