Versions in this module Expand all Collapse all v0 v0.0.1 Aug 12, 2024 Changes in this version + var NotInitializedError error = fmt.Errorf(...) + var ShapeOverflowError error = fmt.Errorf(...) + var ZeroShapeLengthError error = fmt.Errorf("The shape has no dimensions") + func DestroyEnvironment() error + func DisableTelemetry() error + func EnableTelemetry() error + func GetTensorElementDataType[T TensorData]() C.ONNXTensorElementDataType + func InitializeEnvironment() error + func IsInitialized() bool + func SetSharedLibraryPath(path string) + type AdvancedSession struct + func NewAdvancedSession(onnxFilePath string, inputNames, outputNames []string, ...) (*AdvancedSession, error) + func NewAdvancedSessionWithONNXData(onnxData []byte, inputNames, outputNames []string, ...) (*AdvancedSession, error) + func (s *AdvancedSession) Destroy() error + func (s *AdvancedSession) Run() error + type ArbitraryTensor interface + DataType func() C.ONNXTensorElementDataType + Destroy func() error + GetInternals func() *TensorInternalData + GetShape func() Shape + type BadShapeDimensionError struct + DimensionIndex int + DimensionSize int64 + func (e *BadShapeDimensionError) Error() string + type CUDAProviderOptions struct + func NewCUDAProviderOptions() (*CUDAProviderOptions, error) + func (o *CUDAProviderOptions) Destroy() error + func (o *CUDAProviderOptions) Update(options map[string]string) error + type DynamicAdvancedSession struct + func NewDynamicAdvancedSession(onnxFilePath string, inputNames, outputNames []string, options *SessionOptions) (*DynamicAdvancedSession, error) + func NewDynamicAdvancedSessionWithONNXData(onnxData []byte, inputNames, outputNames []string, options *SessionOptions) (*DynamicAdvancedSession, error) + func (s *DynamicAdvancedSession) Destroy() error + func (s *DynamicAdvancedSession) Run(inputs, outputs []ArbitraryTensor) error + type DynamicSession struct + func NewDynamicSessionWithONNXData[in TensorData, out TensorData](onnxData []byte, inputNames, outputNames []string) (*DynamicSession[in, out], error) + func NewDynamicSession[in TensorData, out TensorData](onnxFilePath string, inputNames, outputNames []string) (*DynamicSession[in, out], error) + func (s *DynamicSession[_, _]) Destroy() error + func (s *DynamicSession[in, out]) Run(inputs []*Tensor[in], outputs []*Tensor[out]) error + type FloatData interface + type IntData interface + type Session struct + func NewSessionWithONNXData[T TensorData](onnxData []byte, inputNames, outputNames []string, ...) (*Session[T], error) + func NewSession[T TensorData](onnxFilePath string, inputNames, outputNames []string, ...) (*Session[T], error) + func (s *Session[T]) Run() error + func (s *Session[_]) Destroy() error + type SessionOptions struct + func NewSessionOptions() (*SessionOptions, error) + func (o *SessionOptions) AppendExecutionProviderCUDA(cudaOptions *CUDAProviderOptions) error + func (o *SessionOptions) AppendExecutionProviderCoreML(flags uint32) error + func (o *SessionOptions) AppendExecutionProviderTensorRT(tensorRTOptions *TensorRTProviderOptions) error + func (o *SessionOptions) Destroy() error + func (o *SessionOptions) SetInterOpNumThreads(n int) error + func (o *SessionOptions) SetIntraOpNumThreads(n int) error + type Shape []int64 + func NewShape(dimensions ...int64) Shape + func (s Shape) Clone() Shape + func (s Shape) Equals(other Shape) bool + func (s Shape) FlattenedSize() int64 + func (s Shape) String() string + func (s Shape) Validate() error + type Tensor struct + func NewEmptyTensor[T TensorData](s Shape) (*Tensor[T], error) + func NewTensor[T TensorData](s Shape, data []T) (*Tensor[T], error) + func (t *Tensor[T]) Clone() (*Tensor[T], error) + func (t *Tensor[T]) DataType() C.ONNXTensorElementDataType + func (t *Tensor[T]) GetData() []T + func (t *Tensor[_]) Destroy() error + func (t *Tensor[_]) GetInternals() *TensorInternalData + func (t *Tensor[_]) GetShape() Shape + type TensorData interface + type TensorInternalData struct + type TensorRTProviderOptions struct + func NewTensorRTProviderOptions() (*TensorRTProviderOptions, error) + func (o *TensorRTProviderOptions) Destroy() error + func (o *TensorRTProviderOptions) Update(options map[string]string) error