gorgonnx

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

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

Go to latest
Published: Mar 1, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

README

Travis GoDoc

This project is no longer maintened.

This project is a POC; it embed an old version of onnx-go and a tweaked version of Gorgonia in the vendor directories. The effort is now ported to the project onnx-go

Blog

I wrote two article about the genesis of the project:

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableOperators = map[string]Operator{
	"Conv":               &operators.Conv{},
	"Mul":                &operators.Mul{},
	"MatMul":             &operators.Matmul{},
	"Div":                &operators.Div{},
	"Add":                &operators.Add{},
	"Relu":               &operators.Relu{},
	"MaxPool":            &operators.Maxpool{},
	"Concat":             &operators.Concat{},
	"Constant":           &operators.Constant{},
	"Reshape":            &operators.Reshape{},
	"BatchNormalization": &operators.Batchnorm{},
	"Unsqueeze":          &operators.Unsqueeze{},
}

AvailableOperators is the list of the onnx operators available linked to their implementation

Functions

func GetOutputGraphNodes

func GetOutputGraphNodes(g *gorgonia.ExprGraph) gorgonia.Nodes

GetOutputGraphNodes returns the nodes that are the output of the graph and not orhpan Nodes This is avoid to return the nodes used for the reshape operator

func GetOutputNodes

func GetOutputNodes(g *gorgonia.ExprGraph) gorgonia.Nodes

GetOutputNodes returns the nodes that are the output of the graph

func NewGraph

func NewGraph(gx *onnx.GraphProto) (*gorgonia.ExprGraph, error)

NewGraph returns a new graph that is initialized with gx as its initial content.

func NewValue

func NewValue(valueProto *onnx.ValueInfoProto) (gorgonia.Value, error)

NewValue returns a Gorgonia compatible value from a onnx.ValueInfoProto structure By now, it will return a tensor.Tensor

Types

type ErrNotImplemented

type ErrNotImplemented struct {
	Operator  string
	Attribute *onnx.AttributeProto
	Err       error
}

ErrNotImplemented is a special error type used in the tests

func (ErrNotImplemented) Error

func (e ErrNotImplemented) Error() string

type Operator

type Operator interface {
	Init([]*onnx.AttributeProto) error
	Apply(input ...*gorgonia.Node) ([]*gorgonia.Node, error)
}

Operator can be added to the computation graph

Directories

Path Synopsis
utilities

Jump to

Keyboard shortcuts

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