Versions in this module Expand all Collapse all v1 v1.0.1 Jun 30, 2026 Changes in this version + var ActivePool atomic.Pointer[tensor.Pool] + var ActiveWorkerPool atomic.Pointer[WorkerPool] + var ErrEmptyOpType = errors.New("ops: empty op type") + var ErrIncompatibleShapes = errors.New("ops: incompatible shapes") + var ErrInvalidInputCount = errors.New("ops: invalid input count") + var ErrNilOperator = errors.New("ops: nil operator") + var ErrOperatorExists = errors.New("ops: operator already registered") + var ErrOperatorNotFound = errors.New("ops: operator not found") + func DequantizeQ8_0(src []byte, dst []float32, count int) + func ForceRegister(opType string, op Operator) error + func Im2col(pool *tensor.Pool, data []float32, ...) []float32 + func List() []string + func MustRegister(opType string, op Operator) + func QuantizeQ8_0(src []float32) []byte + func QuantizeWeightRows(weights []float32, outChannels, innerSize int) (blocks []byte, blocksPerRow int) + func Register(opType string, op Operator) error + func Transpose(pool *tensor.Pool, data []float32, rows, cols int) []float32 + func Unregister(opType string) error + type AddOp struct + func (AddOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type AveragePoolOp struct + func (AveragePoolOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type BatchNormalizationOp struct + func (BatchNormalizationOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type CastOp struct + func (CastOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type ClipOp struct + func (op ClipOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type ConcatFusedTailOp struct + func (ConcatFusedTailOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ConcatOp struct + func (ConcatOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ConvLeakyReluOp struct + func (ConvLeakyReluOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ConvOp struct + func (ConvOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ConvPReluOp struct + func (ConvPReluOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type DepthToSpaceOp struct + func (DepthToSpaceOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type DropoutOp struct + func (DropoutOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type EqualOp struct + func (EqualOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type FlattenOp struct + func (FlattenOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type GemmOp struct + func (GemmOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type GlobalAveragePoolOp struct + func (GlobalAveragePoolOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type LeakyReluOp struct + func (op LeakyReluOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type MulAddOp struct + func (MulAddOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type MulOp struct + func (MulOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type Operator interface + Execute func(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + func Get(opType string) (Operator, error) + type PReluOp struct + func (PReluOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ReduceMeanOp struct + func (ReduceMeanOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ReluOp struct + func (ReluOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type ReshapeOp struct + func (ReshapeOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type ResizeOp struct + func (ResizeOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type SigmoidOp struct + func (SigmoidOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type SqueezeOp struct + func (SqueezeOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type SubOp struct + func (SubOp) Execute(inputs []*tensor.Tensor, _ map[string]*onnx.Attribute, alloc tensor.Allocator) ([]*tensor.Tensor, error) + type TransposeOp struct + func (TransposeOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type UnsqueezeOp struct + func (UnsqueezeOp) Execute(inputs []*tensor.Tensor, attributes map[string]*onnx.Attribute, ...) ([]*tensor.Tensor, error) + type WorkerPool struct + func NewWorkerPool(requested int) *WorkerPool + func (p *WorkerPool) Shutdown() + func (p *WorkerPool) Submit(fn func()) + func (p *WorkerPool) Workers() int