Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/c-bata/go-onnx
Golang binding of ONNX and ONNX-ML.
https://github.com/c-bata/go-onnx
Last synced: 14 days ago
JSON representation
Golang binding of ONNX and ONNX-ML.
- Host: GitHub
- URL: https://github.com/c-bata/go-onnx
- Owner: c-bata
- License: mit
- Created: 2019-05-22T19:56:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T19:56:56.000Z (over 5 years ago)
- Last Synced: 2024-10-08T21:06:31.839Z (about 1 month ago)
- Language: Makefile
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-onnx
Golang binding of ONNX and ONNX-ML.
## Usage
1. Export ONNX-ML IR by using [sklearn-onnx](https://github.com/onnx/sklearn-onnx)
2. Binds it to Go's struct like following code:```go
package mainimport (
"fmt"
"io/ioutil"
"log""github.com/c-bata/go-onnx/onnx"
)func main() {
b, err := ioutil.ReadFile("./rf_iris.onnx")
if err != nil {
log.Fatalln(err)
}
p := &onnx.ModelProto{}
if err := p.XXX_Unmarshal(b); err != nil {
log.Fatalln(err)
}fmt.Printf("%#v", p)
}
```## License
MIT License