onnx

package module
v0.0.0-...-7711666 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2019 License: MIT Imports: 0 Imported by: 0

README

go-onnx

Golang binding of ONNX and ONNX-ML.

Usage

  1. Export ONNX-ML IR by using sklearn-onnx
  2. Binds it to Go's struct like following code:
package main

import (
	"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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
_examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL