Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
onnx-go gives the ability to import a pre-trained neural network within Go without being linked to a framework or library.
| Date | Stars |
|---|---|
| 2026-08-04 | 903 |
| 2026-08-06 | 903 |
| 2026-08-11 | 904 |
| 2026-08-12 | 904 |
| 2026-08-13 | 904 |
| 2026-08-14 | 903 |
| 2026-08-17 | 905 |
| 2026-08-18 | 905 |
| 2026-08-27 | 906 |
| 2026-09-02 | 907 |
| 2026-09-07 | 908 |
| 2026-09-24 | 909 |
| 2026-10-13 | 908 |
| 2026-10-29 | 909 |
| 2026-10-30 | 909 |
| 2026-11-04 | 909 |
Today
— stars today
This week
+1 stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.11%/day
 
[](https://github.com/avelino/awesome-go#machine-learning) [](https://godoc.org/github.com/owulveryck/onnx-go) [](https://goreportcard.com/report/github.com/owulveryck/onnx-go)
[](https://travis-ci.com/owulveryck/onnx-go)
[](https://codecov.io/gh/owulveryck/onnx-go)
This is a Go Interface to [Open Neural Network Exchange (ONNX)](https://onnx.ai/).
# READ BEFORE USING
This project was originally created by [owulveryck](https://github.com/owulveryck), and archived on May 31, 2024.
At [Orama](https://orama.com), we decided to revive the project and we'll be dedicating some substantial efforts to make it shine again!
With that being said, thank you [owulveryck](https://github.com/owulveryck) for your great work and trust in us to bring this project on.
We're starting now to actively maintain it, so if you find any issues, please be patient.
Thanks for your understanding!
## Overview
onnx-go contains primitives to decode a onnx binary model into a computation backend, and use it like any other library in your go code.
for more information about onnx, please visit [onnx.ai](https://onnx.ai).
The implementation of the [the spec of ONNX](https://github.com/onnx/onnx/blob/master/docs/IR.md) is partial on the import, and non-existent for the export.
### Vision statement
> For the Go developer who needs to add a machine learning capability to his/her code,
> onnx-go is a package that facilitates the use of neural network models (software 2.0)
> and unlike any other computation library, this package does not require special skills in data-science.
**Warning** The API is experimental and may change.
### Disclaimer
[embedmd]:# (RELNOTES.md)
```md
This is a new version of the API.
The tweaked version of Gorgonia have been removed. It is now compatible with the master branch of Gorgonia.
Some operators are not yet available though.
A utility has been added in order to run models from the zoo.
check the `examples` subdirectory.
```
## Install
Install it via go get
```
go get github.com/owulveryck/onnx-go
```
onnx-go is compatible with [go modules](https://github.com/golang/go/wiki/Modules).
## Example
Those examples assumes that you have a pre-trained `model.onnx` file available.
You can download pre-trained modles from the [onnx model zoo](https://github.com/onnx/models).
### Very simple example
This example does nothing but decoding the graph into a simple backend.
Then you can do whatever you want with the generated graph.
[embedmd]:# (example_test.go /\/\/ Create/ /model.UnmarshalBinary.*/)
```go
// Create a backend receiver
backend := simple.NewSimpleGraph()
// Create a model and set the execution backend
model := onnx.NewModel(backend)
// read the onnx model
b, _ := ioutil.ReadFile("model.onnx")
// Decode it into the model
err := model.UnmarshalBinary(b)
```
### Simple example to run a pre-trained model
This example uses [Gorgonia](https://github.com/gorgonia/gorgonia) as a backend.
```go
import "github.com/owulveryck/onnx-go/backend/x/gorgonnx"
```
At the present time, Gorgonia does not implement all the operators of ONNX. Therefore, most of the model from the model zoo will not work.
Things will go better little by little by adding more operators to the backend.
You can find a list of tested examples and a coverage [here](https://github.com/owulveryck/onnx-go/blob/master/backend/x/gorgonnx/ONNX_COVERAGE.md).
[embedmd]:# (example_gorgonnx_test.go /func Ex/ /^}/)
```go
func Example_gorgonia() {
// Create a backend receiver
backend := gorgonExcerpt of 7,840 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:8e4bdf0b4756c2b2, llm:Repository description and README: 'onnx-go gives the ability to import a pre-trained neural network within Go', 'Go Interface to Open Neural Network Exchange (ONNX)', topics include 'machine-learning', 'neural-network', 'onnx', 'gorgonia'.
matched fp:8e4bdf0b4756c2b2, llm:Repository description and README: 'onnx-go gives the ability to import a pre-trained neural network within Go', 'Go Interface to Open Neural Network Exchange (ONNX)', topics include 'machine-learning', 'neural-network', 'onnx', 'gorgonia'.