opset13

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinAbsInputs = 1
	MaxAbsInputs = 1
)
View Source
const (
	MinAddInputs = 2
	MaxAddInputs = 2
)
View Source
const (
	MinCastInputs = 1
	MaxCastInputs = 1
)
View Source
const (
	MinConstantOfShapeInputs = 1
	MaxConstantOfShapeInputs = 1
)
View Source
const (
	MinDivInputs = 2
	MaxDivInputs = 2
)
View Source
const (
	MinFlattenInputs = 1
	MaxFlattenInputs = 1
)
View Source
const (
	MinGatherInputs = 2
	MaxGatherInputs = 2
)
View Source
const (
	MinGemmInputs = 2
	MaxGemmInputs = 3
)
View Source
const (
	MinGRUInputs = 3
	MaxGRUInputs = 6
)
View Source
const (
	MinLinearRegressorInputs = 1
	MaxLinearRegressorInputs = 1
)
View Source
const (
	MinLSTMInputs = 3
	MaxLSTMInputs = 8
)
View Source
const (
	MinMatMulInputs = 2
	MaxMatMulInputs = 2
)
View Source
const (
	MinMulInputs = 2
	MaxMulInputs = 2
)
View Source
const (
	PReluMinInputs = 2
	PReluMaxInputs = 2
)
View Source
const (
	ReshapeMinInputs = 2
	ReshapeMaxInputs = 2
)
View Source
const (
	MinRNNInputs = 3
	MaxRNNInputs = 6
)
View Source
const (
	ScalerExpectedAttributes = 2
	MinScalerInputs          = 1
	MaxScalerInputs          = 1
)
View Source
const (
	MinShapeInputs = 1
	MaxShapeInputs = 1
)
View Source
const (
	MinSliceInputs = 3
	MaxSliceInputs = 5
)
View Source
const (
	MinSqueezeInputs = 1
	MaxSqueezeInputs = 2
)
View Source
const (
	MinSubInputs = 2
	MaxSubInputs = 2
)
View Source
const (
	MinTransposeInputs = 1
	MaxTransposeInputs = 1
)
View Source
const (
	MinUnsqueezeInputs = 2
	MaxUnsqueezeInputs = 2
)
View Source
const (
	MinConcatInputs = 1
)

Variables

View Source
var (
	MinAndInputs = 2
	MaxAndInputs = 2
)
View Source
var (
	MinConvInputs      = 2
	MaxConvInputs      = 3
	NDims1DConvolution = 3
	NDims2DConvolution = 4
)
View Source
var (
	MinEqualInputs = 2
	MaxEqualInputs = 2
)
View Source
var (
	MinGreaterInputs = 2
	MaxGreaterInputs = 2
)
View Source
var (
	MinGreaterOrEqualInputs = 2
	MaxGreaterOrEqualInputs = 2
)
View Source
var (
	MinLessInputs = 2
	MaxLessInputs = 2
)
View Source
var (
	MinLessOrEqualInputs = 2
	MaxLessOrEqualInputs = 2
)
View Source
var (
	MinOrInputs = 2
	MaxOrInputs = 2
)
View Source
var (
	MinXorInputs = 2
	MaxXorInputs = 2
)

Functions

func GetOpNames

func GetOpNames() []string

GetOpNames returns a list with operator names for opset 13.

func GetOperator

func GetOperator(operatorType string) (ops.Operator, error)

GetOperator maps strings as found in the ModelProto to Operators from opset 13.

Types

type Abs

type Abs struct{}

Abs represents the ONNX abs operator.

func (*Abs) Apply

func (a *Abs) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the abs operator.

func (*Abs) GetInputTypeConstraints

func (a *Abs) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Abs) GetMaxInputs

func (a *Abs) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Abs) GetMinInputs

func (a *Abs) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Abs) Init

func (a *Abs) Init(*onnx.NodeProto) error

Init initializes the abs operator.

func (*Abs) String

func (a *Abs) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Abs) ValidateInputs

func (a *Abs) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Acos

type Acos struct{}

Acos represents the ONNX acos operator.

func (*Acos) Apply

func (c *Acos) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the acos operator.

func (*Acos) GetInputTypeConstraints

func (c *Acos) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Acos) GetMaxInputs

func (c *Acos) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Acos) GetMinInputs

func (c *Acos) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Acos) Init

func (c *Acos) Init(*onnx.NodeProto) error

Init initializes the acos operator.

func (*Acos) String

func (c *Acos) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Acos) ValidateInputs

func (c *Acos) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Acosh

type Acosh struct{}

Acosh represents the ONNX acosh operator.

func (*Acosh) Apply

func (c *Acosh) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the acosh operator.

func (*Acosh) GetInputTypeConstraints

func (c *Acosh) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Acosh) GetMaxInputs

func (c *Acosh) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Acosh) GetMinInputs

func (c *Acosh) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Acosh) Init

func (c *Acosh) Init(*onnx.NodeProto) error

Init initializes the acosh operator.

func (*Acosh) String

func (c *Acosh) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Acosh) ValidateInputs

func (c *Acosh) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Add

type Add struct{}

Add represents the ONNX add operator.

func (*Add) Apply

func (a *Add) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the add operator.

func (*Add) GetInputTypeConstraints

func (a *Add) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Add) GetMaxInputs

func (a *Add) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Add) GetMinInputs

func (a *Add) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Add) Init

func (a *Add) Init(*onnx.NodeProto) error

Init initializes the add operator.

func (*Add) String

func (a *Add) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Add) ValidateInputs

func (a *Add) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type And

type And struct{}

And represents the ONNX and operator.

func (*And) Apply

func (a *And) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the and operator.

func (*And) GetInputTypeConstraints

func (a *And) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*And) GetMaxInputs

func (a *And) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*And) GetMinInputs

func (a *And) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*And) Init

func (a *And) Init(*onnx.NodeProto) error

Init initializes the and operator.

func (*And) String

func (a *And) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*And) ValidateInputs

func (a *And) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Asin

type Asin struct{}

Asin represents the ONNX asin operator.

func (*Asin) Apply

func (s *Asin) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the asin operator.

func (*Asin) GetInputTypeConstraints

func (s *Asin) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Asin) GetMaxInputs

func (s *Asin) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Asin) GetMinInputs

func (s *Asin) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Asin) Init

func (s *Asin) Init(*onnx.NodeProto) error

Init initializes the asin operator.

func (*Asin) String

func (s *Asin) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Asin) ValidateInputs

func (s *Asin) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Asinh

type Asinh struct{}

Asinh represents the ONNX asinh operator.

func (*Asinh) Apply

func (a *Asinh) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the asinh operator.

func (*Asinh) GetInputTypeConstraints

func (a *Asinh) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Asinh) GetMaxInputs

func (a *Asinh) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Asinh) GetMinInputs

func (a *Asinh) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Asinh) Init

func (a *Asinh) Init(*onnx.NodeProto) error

Init initializes the asinh operator.

func (*Asinh) String

func (a *Asinh) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Asinh) ValidateInputs

func (a *Asinh) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Atan

type Atan struct{}

Atan represents the ONNX atan operator.

func (*Atan) Apply

func (a *Atan) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the atan operator.

func (*Atan) GetInputTypeConstraints

func (a *Atan) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Atan) GetMaxInputs

func (a *Atan) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Atan) GetMinInputs

func (a *Atan) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Atan) Init

func (a *Atan) Init(*onnx.NodeProto) error

Init initializes the atan operator.

func (*Atan) String

func (a *Atan) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Atan) ValidateInputs

func (a *Atan) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Atanh

type Atanh struct{}

Atanh represents the ONNX atanh operator.

func (*Atanh) Apply

func (a *Atanh) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the atanh operator.

func (*Atanh) GetInputTypeConstraints

func (a *Atanh) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Atanh) GetMaxInputs

func (a *Atanh) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Atanh) GetMinInputs

func (a *Atanh) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Atanh) Init

func (a *Atanh) Init(*onnx.NodeProto) error

Init initializes the atanh operator.

func (*Atanh) String

func (a *Atanh) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Atanh) ValidateInputs

func (a *Atanh) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type AutoPadSetting

type AutoPadSetting string
const (
	NotSet    AutoPadSetting = "NOTSET"
	SameUpper AutoPadSetting = "SAME_UPPER"
	SameLower AutoPadSetting = "SAME_LOWER"
	Valid     AutoPadSetting = "VALID"
)

type Cast

type Cast struct {
	// contains filtered or unexported fields
}

Cast represents the ONNX cast operator.

func (*Cast) Apply

func (c *Cast) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the cast operator.

func (*Cast) GetInputTypeConstraints

func (c *Cast) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Cast) GetMaxInputs

func (c *Cast) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Cast) GetMinInputs

func (c *Cast) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Cast) Init

func (c *Cast) Init(n *onnx.NodeProto) error

Init initializes the cast operator.

func (*Cast) String

func (c *Cast) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Cast) ValidateInputs

func (c *Cast) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Concat

type Concat struct {
	// contains filtered or unexported fields
}

Concat represents the ONNX concat operator.

func (*Concat) Apply

func (c *Concat) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the concat operator.

func (*Concat) GetInputTypeConstraints

func (c *Concat) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Concat) GetMaxInputs

func (c *Concat) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Concat) GetMinInputs

func (c *Concat) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Concat) Init

func (c *Concat) Init(n *onnx.NodeProto) error

Init initializes the concat operator.

func (*Concat) String

func (c *Concat) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Concat) ValidateInputs

func (c *Concat) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Constant

type Constant struct {
	// contains filtered or unexported fields
}

Constant represents the ONNX constant operator.

func (*Constant) Apply

func (c *Constant) Apply(_ []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the constant operator.

func (*Constant) GetInputTypeConstraints

func (c *Constant) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Constant) GetMaxInputs

func (c *Constant) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Constant) GetMinInputs

func (c *Constant) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Constant) Init

func (c *Constant) Init(n *onnx.NodeProto) error

Init initializes the constant operator. It supports all constant types except `sparse_value`, `value_string`, and `value_strings`.

func (*Constant) String

func (c *Constant) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Constant) ValidateInputs

func (c *Constant) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type ConstantOfShape

type ConstantOfShape struct {
	// contains filtered or unexported fields
}

ConstantOfShape represents the ONNX constant of shape operator.

func (*ConstantOfShape) Apply

func (c *ConstantOfShape) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the constant of shape operator.

func (*ConstantOfShape) GetInputTypeConstraints

func (c *ConstantOfShape) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*ConstantOfShape) GetMaxInputs

func (c *ConstantOfShape) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*ConstantOfShape) GetMinInputs

func (c *ConstantOfShape) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*ConstantOfShape) Init

func (c *ConstantOfShape) Init(n *onnx.NodeProto) error

Init initializes the constant of shape operator.

func (*ConstantOfShape) String

func (c *ConstantOfShape) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*ConstantOfShape) ValidateInputs

func (c *ConstantOfShape) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Conv

type Conv struct {
	// contains filtered or unexported fields
}

Conv represents the ONNX conv operator.

func (*Conv) Apply

func (c *Conv) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the conv operator.

func (*Conv) GetInputTypeConstraints

func (c *Conv) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Conv) GetMaxInputs

func (c *Conv) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Conv) GetMinInputs

func (c *Conv) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Conv) Init

func (c *Conv) Init(n *onnx.NodeProto) error

Init initializes the conv operator.

func (*Conv) String

func (c *Conv) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Conv) ValidateInputs

func (c *Conv) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Cos

type Cos struct{}

Cos represents the ONNX cos operator.

func (*Cos) Apply

func (c *Cos) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the cos operator.

func (*Cos) GetInputTypeConstraints

func (c *Cos) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Cos) GetMaxInputs

func (c *Cos) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Cos) GetMinInputs

func (c *Cos) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Cos) Init

func (c *Cos) Init(*onnx.NodeProto) error

Init initializes the cos operator.

func (*Cos) String

func (c *Cos) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Cos) ValidateInputs

func (c *Cos) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Cosh

type Cosh struct{}

Cosh represents the ONNX cosh operator.

func (*Cosh) Apply

func (c *Cosh) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the cosh operator.

func (*Cosh) GetInputTypeConstraints

func (c *Cosh) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Cosh) GetMaxInputs

func (c *Cosh) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Cosh) GetMinInputs

func (c *Cosh) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Cosh) Init

func (c *Cosh) Init(*onnx.NodeProto) error

Init initializes the cosh operator.

func (*Cosh) String

func (c *Cosh) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Cosh) ValidateInputs

func (c *Cosh) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Div

type Div struct{}

Div represents the ONNX div operator.

func (*Div) Apply

func (d *Div) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the div operator.

func (*Div) GetInputTypeConstraints

func (d *Div) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Div) GetMaxInputs

func (d *Div) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Div) GetMinInputs

func (d *Div) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Div) Init

func (d *Div) Init(*onnx.NodeProto) error

Init initializes the div operator.

func (*Div) String

func (d *Div) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Div) ValidateInputs

func (d *Div) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Equal

type Equal struct{}

Equal represents the ONNX equal operator.

func (*Equal) Apply

func (e *Equal) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the equal operator.

func (*Equal) GetInputTypeConstraints

func (e *Equal) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Equal) GetMaxInputs

func (e *Equal) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Equal) GetMinInputs

func (e *Equal) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Equal) Init

func (e *Equal) Init(*onnx.NodeProto) error

Init initializes the equal operator.

func (*Equal) String

func (e *Equal) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Equal) ValidateInputs

func (e *Equal) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Flatten added in v1.1.0

type Flatten struct {
	// contains filtered or unexported fields
}

Flatten represents the ONNX flatten operator.

func (*Flatten) Apply added in v1.1.0

func (f *Flatten) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the flatten operator.

func (*Flatten) GetInputTypeConstraints added in v1.1.0

func (f *Flatten) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Flatten) GetMaxInputs added in v1.1.0

func (f *Flatten) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Flatten) GetMinInputs added in v1.1.0

func (f *Flatten) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Flatten) Init added in v1.1.0

func (f *Flatten) Init(n *onnx.NodeProto) error

Init initializes the flatten operator.

func (*Flatten) String added in v1.1.0

func (f *Flatten) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Flatten) ValidateInputs added in v1.1.0

func (f *Flatten) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type GRU

type GRU struct {
	// contains filtered or unexported fields
}

GRU represents the ONNX gru operator. It only supports a simple forward gru operation with default activations.

func (*GRU) Apply

func (g *GRU) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the gru operator.

func (*GRU) GetInputTypeConstraints

func (g *GRU) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*GRU) GetMaxInputs

func (g *GRU) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*GRU) GetMinInputs

func (g *GRU) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*GRU) Init

func (g *GRU) Init(n *onnx.NodeProto) error

Init initializes the gru operator. Currently, our GRU operator does not support all attributes as specified by the ONNX operator. The basic functionality is working and the other attributes can be added later on.

func (*GRU) String

func (g *GRU) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*GRU) ValidateInputs

func (g *GRU) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Gather

type Gather struct {
	// contains filtered or unexported fields
}

Gather represents the ONNX gather operator.

func (*Gather) Apply

func (g *Gather) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the gather operator.

func (*Gather) GetInputTypeConstraints

func (g *Gather) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Gather) GetMaxInputs

func (g *Gather) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Gather) GetMinInputs

func (g *Gather) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Gather) Init

func (g *Gather) Init(n *onnx.NodeProto) error

Init initializes the gather operator.

func (*Gather) String

func (g *Gather) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Gather) ValidateInputs

func (g *Gather) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Gemm

type Gemm struct {
	// contains filtered or unexported fields
}

Gemm represents the ONNX gemm operator.

func (*Gemm) Apply

func (g *Gemm) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the gemm operator on the given graph.

func (*Gemm) GetInputTypeConstraints

func (g *Gemm) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Gemm) GetMaxInputs

func (g *Gemm) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Gemm) GetMinInputs

func (g *Gemm) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Gemm) Init

func (g *Gemm) Init(n *onnx.NodeProto) error

Init initializes the Gemm operator based on the ModelProto attributes.

func (*Gemm) String

func (g *Gemm) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Gemm) ValidateInputs

func (g *Gemm) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Greater

type Greater struct{}

Greater represents the ONNX greater operator.

func (*Greater) Apply

func (g *Greater) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the greater operator.

func (*Greater) GetInputTypeConstraints

func (g *Greater) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Greater) GetMaxInputs

func (g *Greater) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Greater) GetMinInputs

func (g *Greater) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Greater) Init

func (g *Greater) Init(*onnx.NodeProto) error

Init initializes the greater operator.

func (*Greater) String

func (g *Greater) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Greater) ValidateInputs

func (g *Greater) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type GreaterOrEqual

type GreaterOrEqual struct{}

GreaterOrEqual represents the ONNX greaterOrEqual operator.

func (*GreaterOrEqual) Apply

func (g *GreaterOrEqual) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the greaterOrEqual operator.

func (*GreaterOrEqual) GetInputTypeConstraints

func (g *GreaterOrEqual) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*GreaterOrEqual) GetMaxInputs

func (g *GreaterOrEqual) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*GreaterOrEqual) GetMinInputs

func (g *GreaterOrEqual) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*GreaterOrEqual) Init

func (g *GreaterOrEqual) Init(*onnx.NodeProto) error

Init initializes the greaterOrEqual operator.

func (*GreaterOrEqual) String

func (g *GreaterOrEqual) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*GreaterOrEqual) ValidateInputs

func (g *GreaterOrEqual) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type LSTM

type LSTM struct {
	// contains filtered or unexported fields
}

LSTM represents the ONNX lstm operator.

func (*LSTM) Apply

func (l *LSTM) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the lstm operator.

func (*LSTM) GetInputTypeConstraints

func (l *LSTM) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*LSTM) GetMaxInputs

func (l *LSTM) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*LSTM) GetMinInputs

func (l *LSTM) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*LSTM) Init

func (l *LSTM) Init(n *onnx.NodeProto) error

Init initializes the lstm operator.

func (*LSTM) String

func (l *LSTM) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*LSTM) ValidateInputs

func (l *LSTM) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Less

type Less struct{}

Less represents the ONNX less operator.

func (*Less) Apply

func (l *Less) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the less operator.

func (*Less) GetInputTypeConstraints

func (l *Less) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Less) GetMaxInputs

func (l *Less) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Less) GetMinInputs

func (l *Less) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Less) Init

func (l *Less) Init(*onnx.NodeProto) error

Init initializes the less operator.

func (*Less) String

func (l *Less) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Less) ValidateInputs

func (l *Less) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type LessOrEqual

type LessOrEqual struct{}

LessOrEqual represents the ONNX lessOrEqual operator.

func (*LessOrEqual) Apply

func (l *LessOrEqual) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the lessOrEqual operator.

func (*LessOrEqual) GetInputTypeConstraints

func (l *LessOrEqual) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*LessOrEqual) GetMaxInputs

func (l *LessOrEqual) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*LessOrEqual) GetMinInputs

func (l *LessOrEqual) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*LessOrEqual) Init

func (l *LessOrEqual) Init(*onnx.NodeProto) error

Init initializes the lessOrEqual operator.

func (*LessOrEqual) String

func (l *LessOrEqual) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*LessOrEqual) ValidateInputs

func (l *LessOrEqual) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type LinearRegressor

type LinearRegressor struct {
	// contains filtered or unexported fields
}

LinearRegressor represents the ONNX-ml linearRegressor operator.

func (*LinearRegressor) Apply

func (l *LinearRegressor) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the linearRegressor operator.

func (*LinearRegressor) GetInputTypeConstraints

func (l *LinearRegressor) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*LinearRegressor) GetMaxInputs

func (l *LinearRegressor) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*LinearRegressor) GetMinInputs

func (l *LinearRegressor) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*LinearRegressor) Init

func (l *LinearRegressor) Init(n *onnx.NodeProto) error

Init initializes the linearRegressor operator.

func (*LinearRegressor) String

func (l *LinearRegressor) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*LinearRegressor) ValidateInputs

func (l *LinearRegressor) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type MatMul

type MatMul struct{}

MatMul represents the ONNX matmul operator.

func (*MatMul) Apply

func (m *MatMul) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the matmul operator.

func (*MatMul) GetInputTypeConstraints

func (m *MatMul) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*MatMul) GetMaxInputs

func (m *MatMul) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*MatMul) GetMinInputs

func (m *MatMul) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*MatMul) Init

func (m *MatMul) Init(*onnx.NodeProto) error

Init initializes the matmul operator.

func (*MatMul) String

func (m *MatMul) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*MatMul) ValidateInputs

func (m *MatMul) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Mul

type Mul struct{}

Mul represents the ONNX mul operator.

func (*Mul) Apply

func (m *Mul) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the mul operator.

func (*Mul) GetInputTypeConstraints

func (m *Mul) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Mul) GetMaxInputs

func (m *Mul) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Mul) GetMinInputs

func (m *Mul) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Mul) Init

func (m *Mul) Init(*onnx.NodeProto) error

Init initializes the mul operator.

func (*Mul) String

func (m *Mul) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Mul) ValidateInputs

func (m *Mul) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Not

type Not struct{}

Not represents the ONNX not operator.

func (*Not) Apply

func (n *Not) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the not operator.

func (*Not) GetInputTypeConstraints

func (n *Not) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Not) GetMaxInputs

func (n *Not) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Not) GetMinInputs

func (n *Not) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Not) Init

func (n *Not) Init(*onnx.NodeProto) error

Init initializes the not operator.

func (*Not) String

func (n *Not) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Not) ValidateInputs

func (n *Not) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Or

type Or struct{}

Or represents the ONNX or operator.

func (*Or) Apply

func (o *Or) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the or operator.

func (*Or) GetInputTypeConstraints

func (o *Or) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Or) GetMaxInputs

func (o *Or) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Or) GetMinInputs

func (o *Or) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Or) Init

func (o *Or) Init(*onnx.NodeProto) error

Init initializes the or operator.

func (*Or) String

func (o *Or) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Or) ValidateInputs

func (o *Or) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type PRelu

type PRelu struct{}

PRelu represents the ONNX prelu operator.

func (*PRelu) Apply

func (op *PRelu) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the prelu operator.

func (*PRelu) GetInputTypeConstraints

func (op *PRelu) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*PRelu) GetMaxInputs

func (op *PRelu) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*PRelu) GetMinInputs

func (op *PRelu) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*PRelu) Init

func (op *PRelu) Init(*onnx.NodeProto) error

Init initializes the prelu operator.

func (*PRelu) String

func (op *PRelu) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*PRelu) ValidateInputs

func (op *PRelu) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type RNN

type RNN struct {
	// contains filtered or unexported fields
}

RNN represents the ONNX rnn operator.

func (*RNN) Apply

func (r *RNN) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the rnn operator.

func (*RNN) GetInputTypeConstraints

func (r *RNN) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*RNN) GetMaxInputs

func (r *RNN) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*RNN) GetMinInputs

func (r *RNN) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*RNN) Init

func (r *RNN) Init(n *onnx.NodeProto) error

Init initializes the rnn operator.

func (*RNN) String

func (r *RNN) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*RNN) ValidateInputs

func (r *RNN) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Relu

type Relu struct{}

Relu represents the ONNX relu operator.

func (*Relu) Apply

func (r *Relu) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the relu operator.

func (*Relu) GetInputTypeConstraints

func (r *Relu) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Relu) GetMaxInputs

func (r *Relu) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Relu) GetMinInputs

func (r *Relu) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Relu) Init

func (r *Relu) Init(*onnx.NodeProto) error

Init initializes the relu operator.

func (*Relu) String

func (r *Relu) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Relu) ValidateInputs

func (r *Relu) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Reshape

type Reshape struct{}

Reshape represents the ONNX reshape operator.

func (*Reshape) Apply

func (r *Reshape) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the reshape operator.

func (*Reshape) GetInputTypeConstraints

func (r *Reshape) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Reshape) GetMaxInputs

func (r *Reshape) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Reshape) GetMinInputs

func (r *Reshape) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Reshape) Init

func (r *Reshape) Init(*onnx.NodeProto) error

Init initializes the reshape operator.

func (*Reshape) String

func (r *Reshape) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Reshape) ValidateInputs

func (r *Reshape) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Scaler

type Scaler struct {
	// contains filtered or unexported fields
}

Scaler represents the ONNX-ml scaler operator.

func (*Scaler) Apply

func (s *Scaler) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the scaler operator.

func (*Scaler) GetInputTypeConstraints

func (s *Scaler) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Scaler) GetMaxInputs

func (s *Scaler) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Scaler) GetMinInputs

func (s *Scaler) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Scaler) Init

func (s *Scaler) Init(n *onnx.NodeProto) error

Init initializes the scaler operator.

func (*Scaler) String

func (s *Scaler) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Scaler) ValidateInputs

func (s *Scaler) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Shape

type Shape struct{}

Shape represents the ONNX shape operator.

func (*Shape) Apply

func (s *Shape) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply the shape operator to the graph. It creates a node that holds the shape of the input node as 1D int64 tensor.

func (*Shape) GetInputTypeConstraints

func (s *Shape) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Shape) GetMaxInputs

func (s *Shape) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Shape) GetMinInputs

func (s *Shape) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Shape) Init

func (s *Shape) Init(*onnx.NodeProto) error

Init initializes the shape operator.

func (*Shape) String

func (s *Shape) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Shape) ValidateInputs

func (s *Shape) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Sigmoid

type Sigmoid struct{}

Sigmoid represents the ONNX sigmoid operator.

func (*Sigmoid) Apply

func (s *Sigmoid) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply the sigmoid operator to the input node.

func (*Sigmoid) GetInputTypeConstraints

func (s *Sigmoid) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Sigmoid) GetMaxInputs

func (s *Sigmoid) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Sigmoid) GetMinInputs

func (s *Sigmoid) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Sigmoid) Init

func (s *Sigmoid) Init(*onnx.NodeProto) error

Init initializes the sigmoid operator.

func (*Sigmoid) String

func (s *Sigmoid) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Sigmoid) ValidateInputs

func (s *Sigmoid) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Sin

type Sin struct{}

Sin represents the ONNX sin operator.

func (*Sin) Apply

func (s *Sin) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the sin operator.

func (*Sin) GetInputTypeConstraints

func (s *Sin) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Sin) GetMaxInputs

func (s *Sin) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Sin) GetMinInputs

func (s *Sin) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Sin) Init

func (s *Sin) Init(*onnx.NodeProto) error

Init initializes the sin operator.

func (*Sin) String

func (s *Sin) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Sin) ValidateInputs

func (s *Sin) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Sinh

type Sinh struct{}

Sinh represents the ONNX sinh operator.

func (*Sinh) Apply

func (s *Sinh) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the sinh operator.

func (*Sinh) GetInputTypeConstraints

func (s *Sinh) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Sinh) GetMaxInputs

func (s *Sinh) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Sinh) GetMinInputs

func (s *Sinh) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Sinh) Init

func (s *Sinh) Init(*onnx.NodeProto) error

Init initializes the sinh operator.

func (*Sinh) String

func (s *Sinh) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Sinh) ValidateInputs

func (s *Sinh) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Slice

type Slice struct{}

Slice represents the ONNX slice operator.

func (*Slice) Apply

func (s *Slice) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the slice operator.

func (*Slice) GetInputTypeConstraints

func (s *Slice) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Slice) GetMaxInputs

func (s *Slice) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Slice) GetMinInputs

func (s *Slice) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Slice) Init

func (s *Slice) Init(*onnx.NodeProto) error

Init initializes the slice operator.

func (*Slice) String

func (s *Slice) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Slice) ValidateInputs

func (s *Slice) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Softmax

type Softmax struct {
	// contains filtered or unexported fields
}

Softmax represents the ONNX softmax operator.

func (*Softmax) Apply

func (s *Softmax) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the softmax operator.

func (*Softmax) GetInputTypeConstraints

func (s *Softmax) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Softmax) GetMaxInputs

func (s *Softmax) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Softmax) GetMinInputs

func (s *Softmax) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Softmax) Init

func (s *Softmax) Init(n *onnx.NodeProto) error

Init initializes the softmax operator.

func (*Softmax) String

func (s *Softmax) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Softmax) ValidateInputs

func (s *Softmax) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Squeeze

type Squeeze struct{}

Squeeze represents the ONNX squeeze operator.

func (*Squeeze) Apply

func (s *Squeeze) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the squeeze operator.

func (*Squeeze) GetInputTypeConstraints

func (s *Squeeze) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Squeeze) GetMaxInputs

func (s *Squeeze) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Squeeze) GetMinInputs

func (s *Squeeze) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Squeeze) Init

func (s *Squeeze) Init(*onnx.NodeProto) error

Init initializes the squeeze operator.

func (*Squeeze) String

func (s *Squeeze) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Squeeze) ValidateInputs

func (s *Squeeze) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Sub

type Sub struct{}

Sub represents the ONNX sub operator.

func (*Sub) Apply

func (s *Sub) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the sub operator.

func (*Sub) GetInputTypeConstraints

func (s *Sub) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Sub) GetMaxInputs

func (s *Sub) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Sub) GetMinInputs

func (s *Sub) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Sub) Init

func (s *Sub) Init(*onnx.NodeProto) error

Init initializes the sub operator.

func (*Sub) String

func (s *Sub) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Sub) ValidateInputs

func (s *Sub) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Tan

type Tan struct{}

Tan represents the ONNX tan operator.

func (*Tan) Apply

func (t *Tan) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the tan operator.

func (*Tan) GetInputTypeConstraints

func (t *Tan) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Tan) GetMaxInputs

func (t *Tan) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Tan) GetMinInputs

func (t *Tan) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Tan) Init

func (t *Tan) Init(*onnx.NodeProto) error

Init initializes the tan operator.

func (*Tan) String

func (t *Tan) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Tan) ValidateInputs

func (t *Tan) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Tanh

type Tanh struct{}

Tanh represents the tanh operator.

func (*Tanh) Apply

func (t *Tanh) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply the sigmoid operator to the input node.

func (*Tanh) GetInputTypeConstraints

func (t *Tanh) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list with for every input tensor a list of allowed types.

func (*Tanh) GetMaxInputs

func (t *Tanh) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Tanh) GetMinInputs

func (t *Tanh) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Tanh) Init

func (t *Tanh) Init(*onnx.NodeProto) error

Init initializes the sigmoid operator.

func (*Tanh) String

func (t *Tanh) String() string

String returns a small name of the operator that can be used in formatting errors or logs.

func (*Tanh) ValidateInputs

func (t *Tanh) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Transpose

type Transpose struct {
	// contains filtered or unexported fields
}

Transpose represents the ONNX transpose operator.

func (*Transpose) Apply

func (t *Transpose) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the transpose operator.

func (*Transpose) GetInputTypeConstraints

func (t *Transpose) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Transpose) GetMaxInputs

func (t *Transpose) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Transpose) GetMinInputs

func (t *Transpose) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Transpose) Init

func (t *Transpose) Init(n *onnx.NodeProto) error

Init initializes the transpose operator.

func (*Transpose) String

func (t *Transpose) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Transpose) ValidateInputs

func (t *Transpose) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Unsqueeze

type Unsqueeze struct{}

Unsqueeze represents the ONNX unsqueeze operator.

func (*Unsqueeze) Apply

func (u *Unsqueeze) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the unsqueeze operator.

func (*Unsqueeze) GetInputTypeConstraints

func (u *Unsqueeze) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Unsqueeze) GetMaxInputs

func (u *Unsqueeze) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Unsqueeze) GetMinInputs

func (u *Unsqueeze) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Unsqueeze) Init

func (u *Unsqueeze) Init(*onnx.NodeProto) error

Init initializes the unsqueeze operator.

func (*Unsqueeze) String

func (u *Unsqueeze) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Unsqueeze) ValidateInputs

func (u *Unsqueeze) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

type Xor

type Xor struct{}

Xor represents the ONNX xor operator.

func (*Xor) Apply

func (x *Xor) Apply(inputs []tensor.Tensor) ([]tensor.Tensor, error)

Apply applies the xor operator.

func (*Xor) GetInputTypeConstraints

func (x *Xor) GetInputTypeConstraints() [][]tensor.Dtype

GetInputTypeConstraints returns a list. Every element represents a set of allowed tensor dtypes for the corresponding input tensor.

func (*Xor) GetMaxInputs

func (x *Xor) GetMaxInputs() int

GetMaxInputs returns the maximum number of input tensors this operator expects.

func (*Xor) GetMinInputs

func (x *Xor) GetMinInputs() int

GetMinInputs returns the minimum number of input tensors this operator expects.

func (*Xor) Init

func (x *Xor) Init(*onnx.NodeProto) error

Init initializes the xor operator.

func (*Xor) String

func (x *Xor) String() string

String implements the stringer interface, and can be used to format errors or messages.

func (*Xor) ValidateInputs

func (x *Xor) ValidateInputs(inputs []tensor.Tensor) ([]tensor.Tensor, error)

ValidateInputs validates the inputs that will be given to Apply for this operator.

Jump to

Keyboard shortcuts

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