onnx

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOInfo

type IOInfo struct {
	Name string
	Type ValueType

	// these fields are only valid if Type == ValueTypeTensor
	DataType TensorElementDataType
	Shape    []int
}

type OnnxRuntime

type OnnxRuntime struct {
	Inputs  []IOInfo
	Outputs []IOInfo
	// contains filtered or unexported fields
}

func NewOnnxRuntime

func NewOnnxRuntime(model []byte) (*OnnxRuntime, error)

func (*OnnxRuntime) Cleanup

func (o *OnnxRuntime) Cleanup()

func (*OnnxRuntime) Run

func (o *OnnxRuntime) Run(desiredOutputs []string, inputs map[string]*tensor.Dense) (out map[string]interface{}, err error)

func (*OnnxRuntime) RunSimple

func (o *OnnxRuntime) RunSimple(inputs ...*tensor.Dense) (map[string]interface{}, error)

type TensorElementDataType

type TensorElementDataType int
const (
	TensorElementDataTypeUndefined TensorElementDataType = iota
	TensorElementDataTypeFloat
	TensorElementDataTypeDouble
	TensorElementDataTypeUint8
	TensorElementDataTypeUint16
	TensorElementDataTypeUint32
	TensorElementDataTypeUint64
	TensorElementDataTypeInt8
	TensorElementDataTypeInt16
	TensorElementDataTypeInt32
	TensorElementDataTypeInt64
	TensorElementDataTypeBool
	TensorElementDataTypeString
	TensorElementDataTypeUnsupported
	TensorElementDataTypeInvalid
)

func (TensorElementDataType) Dtype

func (TensorElementDataType) String

func (t TensorElementDataType) String() string

type ValueType

type ValueType int
const (
	ValueTypeUnknown ValueType = iota
	ValueTypeTensor
	ValueTypeSequence
	ValueTypeMap
	ValueTypeOpaque
	ValueTypeSparseTensor
	ValueTypeOptional
)

func (ValueType) String

func (t ValueType) String() string

Jump to

Keyboard shortcuts

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