onnx

package
v0.28.21 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.Errorf("ONNX support disabled: build with -tags=onnx")

ErrNotImplemented is returned when the package is built without the onnx build tag.

Functions

func IsONNX added in v0.28.14

func IsONNX(backend compute.Backend) bool

IsONNX checks if the given backend is an ONNX backend.

func Save

func Save(backend compute.Backend, exec *model.Exec, w io.Writer, inputShapes []shapes.Shape, inputNames, outputNames []string) error

Save returns ErrNotImplemented when -tags=onnx is not set.

func SaveToFile

func SaveToFile(backend compute.Backend, exec *model.Exec, filePath string, inputShapes []shapes.Shape, inputNames, outputNames []string) error

SaveToFile returns ErrNotImplemented when -tags=onnx is not set.

Types

type Executable

type Executable struct{}

Executable represents a loaded ONNX model executable when ONNX support is disabled.

func Load

func Load(backend compute.Backend, r io.Reader) (*Executable, error)

Load returns ErrNotImplemented when -tags=onnx is not set.

func LoadFromFile

func LoadFromFile(backend compute.Backend, filePath string) (*Executable, error)

LoadFromFile returns ErrNotImplemented when -tags=onnx is not set.

func (*Executable) Call

func (e *Executable) Call(inputs ...any) ([]*tensors.Tensor, error)

Call returns ErrNotImplemented when -tags=onnx is not set.

func (*Executable) Finalize

func (e *Executable) Finalize()

Finalize is a no-op when ONNX support is disabled.

Jump to

Keyboard shortcuts

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