Versions in this module Expand all Collapse all v1 v1.1.0 Jan 30, 2024 v1.0.0 Dec 14, 2023 Changes in this version + var AttributeProto_AttributeType_name = map[int32]string + var AttributeProto_AttributeType_value = map[string]int32 + var ErrInvalidType = errors.New("invalid type") + var File_onnx_proto3 protoreflect.FileDescriptor + var OperatorStatus_name = map[int32]string + var OperatorStatus_value = map[string]int32 + var TensorProto_DataLocation_name = map[int32]string + var TensorProto_DataLocation_value = map[string]int32 + var TensorProto_DataType_name = map[int32]string + var TensorProto_DataType_value = map[string]int32 + var Version_name = map[int32]string + var Version_value = map[string]int32 + func Int32ArrayToBoolArray(arr []int32) []bool + func Int32ArrayToInt16Array(arr []int32) []int16 + func Int32ArrayToInt8Array(arr []int32) []int8 + func Int32ArrayToUint16Array(arr []int32) []uint16 + func Int32ArrayToUint8Array(arr []int32) []uint8 + func ReadBoolArrayFromBytes(data []byte) []bool + func ReadFloat32ArrayFromBytes(data []byte) ([]float32, error) + func ReadFloat64ArrayFromBytes(data []byte) ([]float64, error) + func ReadInt16ArrayFromBytes(data []byte) ([]int16, error) + func ReadInt32ArrayFromBytes(data []byte) ([]int32, error) + func ReadInt64ArrayFromBytes(data []byte) ([]int64, error) + func ReadInt8ArrayFromBytes(data []byte) ([]int8, error) + func ReadUint16ArrayFromBytes(data []byte) ([]uint16, error) + func ReadUint32ArrayFromBytes(data []byte) ([]uint32, error) + func ReadUint64ArrayFromBytes(data []byte) ([]uint64, error) + func ReadUint8ArrayFromBytes(data []byte) ([]uint8, error) + func TensorFromProto(tp *TensorProto) (tensor.Tensor, error) + func Uint64ArrayToUint32Array(arr []uint64) []uint32 + type AttributeProto struct + DocString string + F float32 + Floats []float32 + G *GraphProto + Graphs []*GraphProto + I int64 + Ints []int64 + Name string + RefAttrName string + S []byte + SparseTensor *SparseTensorProto + SparseTensors []*SparseTensorProto + Strings [][]byte + T *TensorProto + Tensors []*TensorProto + Tp *TypeProto + Type AttributeProto_AttributeType + TypeProtos []*TypeProto + func (*AttributeProto) Descriptor() ([]byte, []int) + func (*AttributeProto) ProtoMessage() + func (x *AttributeProto) GetDocString() string + func (x *AttributeProto) GetF() float32 + func (x *AttributeProto) GetFloats() []float32 + func (x *AttributeProto) GetG() *GraphProto + func (x *AttributeProto) GetGraphs() []*GraphProto + func (x *AttributeProto) GetI() int64 + func (x *AttributeProto) GetInts() []int64 + func (x *AttributeProto) GetName() string + func (x *AttributeProto) GetRefAttrName() string + func (x *AttributeProto) GetS() []byte + func (x *AttributeProto) GetSparseTensor() *SparseTensorProto + func (x *AttributeProto) GetSparseTensors() []*SparseTensorProto + func (x *AttributeProto) GetStrings() [][]byte + func (x *AttributeProto) GetT() *TensorProto + func (x *AttributeProto) GetTensors() []*TensorProto + func (x *AttributeProto) GetTp() *TypeProto + func (x *AttributeProto) GetType() AttributeProto_AttributeType + func (x *AttributeProto) GetTypeProtos() []*TypeProto + func (x *AttributeProto) ProtoReflect() protoreflect.Message + func (x *AttributeProto) Reset() + func (x *AttributeProto) String() string + type AttributeProto_AttributeType int32 + const AttributeProto_FLOAT + const AttributeProto_FLOATS + const AttributeProto_GRAPH + const AttributeProto_GRAPHS + const AttributeProto_INT + const AttributeProto_INTS + const AttributeProto_SPARSE_TENSOR + const AttributeProto_SPARSE_TENSORS + const AttributeProto_STRING + const AttributeProto_STRINGS + const AttributeProto_TENSOR + const AttributeProto_TENSORS + const AttributeProto_TYPE_PROTO + const AttributeProto_TYPE_PROTOS + const AttributeProto_UNDEFINED + func (AttributeProto_AttributeType) Descriptor() protoreflect.EnumDescriptor + func (AttributeProto_AttributeType) EnumDescriptor() ([]byte, []int) + func (AttributeProto_AttributeType) Type() protoreflect.EnumType + func (x AttributeProto_AttributeType) Enum() *AttributeProto_AttributeType + func (x AttributeProto_AttributeType) Number() protoreflect.EnumNumber + func (x AttributeProto_AttributeType) String() string + type Dim struct + IsDynamic bool + Name string + Size int64 + func (s Dim) String() string + type FunctionProto struct + Attribute []string + DocString string + Domain string + Input []string + Name string + Node []*NodeProto + OpsetImport []*OperatorSetIdProto + Output []string + func (*FunctionProto) Descriptor() ([]byte, []int) + func (*FunctionProto) ProtoMessage() + func (x *FunctionProto) GetAttribute() []string + func (x *FunctionProto) GetDocString() string + func (x *FunctionProto) GetDomain() string + func (x *FunctionProto) GetInput() []string + func (x *FunctionProto) GetName() string + func (x *FunctionProto) GetNode() []*NodeProto + func (x *FunctionProto) GetOpsetImport() []*OperatorSetIdProto + func (x *FunctionProto) GetOutput() []string + func (x *FunctionProto) ProtoReflect() protoreflect.Message + func (x *FunctionProto) Reset() + func (x *FunctionProto) String() string + type GraphProto struct + DocString string + Initializer []*TensorProto + Input []*ValueInfoProto + Name string + Node []*NodeProto + Output []*ValueInfoProto + QuantizationAnnotation []*TensorAnnotation + SparseInitializer []*SparseTensorProto + ValueInfo []*ValueInfoProto + func (*GraphProto) Descriptor() ([]byte, []int) + func (*GraphProto) ProtoMessage() + func (g *GraphProto) InputNames() []string + func (g *GraphProto) InputShapes() Shapes + func (g *GraphProto) OutputNames() []string + func (g *GraphProto) OutputShapes() Shapes + func (g *GraphProto) ParamNames() []string + func (g *GraphProto) Params() (map[string]tensor.Tensor, error) + func (x *GraphProto) GetDocString() string + func (x *GraphProto) GetInitializer() []*TensorProto + func (x *GraphProto) GetInput() []*ValueInfoProto + func (x *GraphProto) GetName() string + func (x *GraphProto) GetNode() []*NodeProto + func (x *GraphProto) GetOutput() []*ValueInfoProto + func (x *GraphProto) GetQuantizationAnnotation() []*TensorAnnotation + func (x *GraphProto) GetSparseInitializer() []*SparseTensorProto + func (x *GraphProto) GetValueInfo() []*ValueInfoProto + func (x *GraphProto) ProtoReflect() protoreflect.Message + func (x *GraphProto) Reset() + func (x *GraphProto) String() string + type ModelProto struct + DocString string + Domain string + Functions []*FunctionProto + Graph *GraphProto + IrVersion int64 + MetadataProps []*StringStringEntryProto + ModelVersion int64 + OpsetImport []*OperatorSetIdProto + ProducerName string + ProducerVersion string + TrainingInfo []*TrainingInfoProto + func (*ModelProto) Descriptor() ([]byte, []int) + func (*ModelProto) ProtoMessage() + func (x *ModelProto) GetDocString() string + func (x *ModelProto) GetDomain() string + func (x *ModelProto) GetFunctions() []*FunctionProto + func (x *ModelProto) GetGraph() *GraphProto + func (x *ModelProto) GetIrVersion() int64 + func (x *ModelProto) GetMetadataProps() []*StringStringEntryProto + func (x *ModelProto) GetModelVersion() int64 + func (x *ModelProto) GetOpsetImport() []*OperatorSetIdProto + func (x *ModelProto) GetProducerName() string + func (x *ModelProto) GetProducerVersion() string + func (x *ModelProto) GetTrainingInfo() []*TrainingInfoProto + func (x *ModelProto) ProtoReflect() protoreflect.Message + func (x *ModelProto) Reset() + func (x *ModelProto) String() string + type NodeProto struct + Attribute []*AttributeProto + DocString string + Domain string + Input []string + Name string + OpType string + Output []string + func (*NodeProto) Descriptor() ([]byte, []int) + func (*NodeProto) ProtoMessage() + func (x *NodeProto) GetAttribute() []*AttributeProto + func (x *NodeProto) GetDocString() string + func (x *NodeProto) GetDomain() string + func (x *NodeProto) GetInput() []string + func (x *NodeProto) GetName() string + func (x *NodeProto) GetOpType() string + func (x *NodeProto) GetOutput() []string + func (x *NodeProto) ProtoReflect() protoreflect.Message + func (x *NodeProto) Reset() + func (x *NodeProto) String() string + type OperatorSetIdProto struct + Domain string + Version int64 + func (*OperatorSetIdProto) Descriptor() ([]byte, []int) + func (*OperatorSetIdProto) ProtoMessage() + func (x *OperatorSetIdProto) GetDomain() string + func (x *OperatorSetIdProto) GetVersion() int64 + func (x *OperatorSetIdProto) ProtoReflect() protoreflect.Message + func (x *OperatorSetIdProto) Reset() + func (x *OperatorSetIdProto) String() string + type OperatorStatus int32 + const OperatorStatus_EXPERIMENTAL + const OperatorStatus_STABLE + func (OperatorStatus) Descriptor() protoreflect.EnumDescriptor + func (OperatorStatus) EnumDescriptor() ([]byte, []int) + func (OperatorStatus) Type() protoreflect.EnumType + func (x OperatorStatus) Enum() *OperatorStatus + func (x OperatorStatus) Number() protoreflect.EnumNumber + func (x OperatorStatus) String() string + type Shape []Dim + func (s Shape) String() string + type Shapes map[string]Shape + type SparseTensorProto struct + Dims []int64 + Indices *TensorProto + Values *TensorProto + func (*SparseTensorProto) Descriptor() ([]byte, []int) + func (*SparseTensorProto) ProtoMessage() + func (x *SparseTensorProto) GetDims() []int64 + func (x *SparseTensorProto) GetIndices() *TensorProto + func (x *SparseTensorProto) GetValues() *TensorProto + func (x *SparseTensorProto) ProtoReflect() protoreflect.Message + func (x *SparseTensorProto) Reset() + func (x *SparseTensorProto) String() string + type StringStringEntryProto struct + Key string + Value string + func (*StringStringEntryProto) Descriptor() ([]byte, []int) + func (*StringStringEntryProto) ProtoMessage() + func (x *StringStringEntryProto) GetKey() string + func (x *StringStringEntryProto) GetValue() string + func (x *StringStringEntryProto) ProtoReflect() protoreflect.Message + func (x *StringStringEntryProto) Reset() + func (x *StringStringEntryProto) String() string + type TensorAnnotation struct + QuantParameterTensorNames []*StringStringEntryProto + TensorName string + func (*TensorAnnotation) Descriptor() ([]byte, []int) + func (*TensorAnnotation) ProtoMessage() + func (x *TensorAnnotation) GetQuantParameterTensorNames() []*StringStringEntryProto + func (x *TensorAnnotation) GetTensorName() string + func (x *TensorAnnotation) ProtoReflect() protoreflect.Message + func (x *TensorAnnotation) Reset() + func (x *TensorAnnotation) String() string + type TensorProto struct + DataLocation TensorProto_DataLocation + DataType int32 + Dims []int64 + DocString string + DoubleData []float64 + ExternalData []*StringStringEntryProto + FloatData []float32 + Int32Data []int32 + Int64Data []int64 + Name string + RawData []byte + Segment *TensorProto_Segment + StringData [][]byte + Uint64Data []uint64 + func (*TensorProto) Descriptor() ([]byte, []int) + func (*TensorProto) ProtoMessage() + func (x *TensorProto) GetDataLocation() TensorProto_DataLocation + func (x *TensorProto) GetDataType() int32 + func (x *TensorProto) GetDims() []int64 + func (x *TensorProto) GetDocString() string + func (x *TensorProto) GetDoubleData() []float64 + func (x *TensorProto) GetExternalData() []*StringStringEntryProto + func (x *TensorProto) GetFloatData() []float32 + func (x *TensorProto) GetInt32Data() []int32 + func (x *TensorProto) GetInt64Data() []int64 + func (x *TensorProto) GetName() string + func (x *TensorProto) GetRawData() []byte + func (x *TensorProto) GetSegment() *TensorProto_Segment + func (x *TensorProto) GetStringData() [][]byte + func (x *TensorProto) GetUint64Data() []uint64 + func (x *TensorProto) ProtoReflect() protoreflect.Message + func (x *TensorProto) Reset() + func (x *TensorProto) String() string + type TensorProto_DataLocation int32 + const TensorProto_DEFAULT + const TensorProto_EXTERNAL + func (TensorProto_DataLocation) Descriptor() protoreflect.EnumDescriptor + func (TensorProto_DataLocation) EnumDescriptor() ([]byte, []int) + func (TensorProto_DataLocation) Type() protoreflect.EnumType + func (x TensorProto_DataLocation) Enum() *TensorProto_DataLocation + func (x TensorProto_DataLocation) Number() protoreflect.EnumNumber + func (x TensorProto_DataLocation) String() string + type TensorProto_DataType int32 + const TensorProto_BFLOAT16 + const TensorProto_BOOL + const TensorProto_COMPLEX128 + const TensorProto_COMPLEX64 + const TensorProto_DOUBLE + const TensorProto_FLOAT + const TensorProto_FLOAT16 + const TensorProto_INT16 + const TensorProto_INT32 + const TensorProto_INT64 + const TensorProto_INT8 + const TensorProto_STRING + const TensorProto_UINT16 + const TensorProto_UINT32 + const TensorProto_UINT64 + const TensorProto_UINT8 + const TensorProto_UNDEFINED + func (TensorProto_DataType) Descriptor() protoreflect.EnumDescriptor + func (TensorProto_DataType) EnumDescriptor() ([]byte, []int) + func (TensorProto_DataType) Type() protoreflect.EnumType + func (x TensorProto_DataType) Enum() *TensorProto_DataType + func (x TensorProto_DataType) Number() protoreflect.EnumNumber + func (x TensorProto_DataType) String() string + type TensorProto_Segment struct + Begin int64 + End int64 + func (*TensorProto_Segment) Descriptor() ([]byte, []int) + func (*TensorProto_Segment) ProtoMessage() + func (x *TensorProto_Segment) GetBegin() int64 + func (x *TensorProto_Segment) GetEnd() int64 + func (x *TensorProto_Segment) ProtoReflect() protoreflect.Message + func (x *TensorProto_Segment) Reset() + func (x *TensorProto_Segment) String() string + type TensorShapeProto struct + Dim []*TensorShapeProto_Dimension + func (*TensorShapeProto) Descriptor() ([]byte, []int) + func (*TensorShapeProto) ProtoMessage() + func (x *TensorShapeProto) GetDim() []*TensorShapeProto_Dimension + func (x *TensorShapeProto) ProtoReflect() protoreflect.Message + func (x *TensorShapeProto) Reset() + func (x *TensorShapeProto) String() string + type TensorShapeProto_Dimension struct + Denotation string + Value isTensorShapeProto_Dimension_Value + func (*TensorShapeProto_Dimension) Descriptor() ([]byte, []int) + func (*TensorShapeProto_Dimension) ProtoMessage() + func (m *TensorShapeProto_Dimension) GetValue() isTensorShapeProto_Dimension_Value + func (x *TensorShapeProto_Dimension) GetDenotation() string + func (x *TensorShapeProto_Dimension) GetDimParam() string + func (x *TensorShapeProto_Dimension) GetDimValue() int64 + func (x *TensorShapeProto_Dimension) ProtoReflect() protoreflect.Message + func (x *TensorShapeProto_Dimension) Reset() + func (x *TensorShapeProto_Dimension) String() string + type TensorShapeProto_Dimension_DimParam struct + DimParam string + type TensorShapeProto_Dimension_DimValue struct + DimValue int64 + type TrainingInfoProto struct + Algorithm *GraphProto + Initialization *GraphProto + InitializationBinding []*StringStringEntryProto + UpdateBinding []*StringStringEntryProto + func (*TrainingInfoProto) Descriptor() ([]byte, []int) + func (*TrainingInfoProto) ProtoMessage() + func (x *TrainingInfoProto) GetAlgorithm() *GraphProto + func (x *TrainingInfoProto) GetInitialization() *GraphProto + func (x *TrainingInfoProto) GetInitializationBinding() []*StringStringEntryProto + func (x *TrainingInfoProto) GetUpdateBinding() []*StringStringEntryProto + func (x *TrainingInfoProto) ProtoReflect() protoreflect.Message + func (x *TrainingInfoProto) Reset() + func (x *TrainingInfoProto) String() string + type TypeProto struct + Denotation string + Value isTypeProto_Value + func (*TypeProto) Descriptor() ([]byte, []int) + func (*TypeProto) ProtoMessage() + func (m *TypeProto) GetValue() isTypeProto_Value + func (x *TypeProto) GetDenotation() string + func (x *TypeProto) GetMapType() *TypeProto_Map + func (x *TypeProto) GetOptionalType() *TypeProto_Optional + func (x *TypeProto) GetSequenceType() *TypeProto_Sequence + func (x *TypeProto) GetSparseTensorType() *TypeProto_SparseTensor + func (x *TypeProto) GetTensorType() *TypeProto_Tensor + func (x *TypeProto) ProtoReflect() protoreflect.Message + func (x *TypeProto) Reset() + func (x *TypeProto) String() string + type TypeProto_Map struct + KeyType int32 + ValueType *TypeProto + func (*TypeProto_Map) Descriptor() ([]byte, []int) + func (*TypeProto_Map) ProtoMessage() + func (x *TypeProto_Map) GetKeyType() int32 + func (x *TypeProto_Map) GetValueType() *TypeProto + func (x *TypeProto_Map) ProtoReflect() protoreflect.Message + func (x *TypeProto_Map) Reset() + func (x *TypeProto_Map) String() string + type TypeProto_MapType struct + MapType *TypeProto_Map + type TypeProto_Optional struct + ElemType *TypeProto + func (*TypeProto_Optional) Descriptor() ([]byte, []int) + func (*TypeProto_Optional) ProtoMessage() + func (x *TypeProto_Optional) GetElemType() *TypeProto + func (x *TypeProto_Optional) ProtoReflect() protoreflect.Message + func (x *TypeProto_Optional) Reset() + func (x *TypeProto_Optional) String() string + type TypeProto_OptionalType struct + OptionalType *TypeProto_Optional + type TypeProto_Sequence struct + ElemType *TypeProto + func (*TypeProto_Sequence) Descriptor() ([]byte, []int) + func (*TypeProto_Sequence) ProtoMessage() + func (x *TypeProto_Sequence) GetElemType() *TypeProto + func (x *TypeProto_Sequence) ProtoReflect() protoreflect.Message + func (x *TypeProto_Sequence) Reset() + func (x *TypeProto_Sequence) String() string + type TypeProto_SequenceType struct + SequenceType *TypeProto_Sequence + type TypeProto_SparseTensor struct + ElemType int32 + Shape *TensorShapeProto + func (*TypeProto_SparseTensor) Descriptor() ([]byte, []int) + func (*TypeProto_SparseTensor) ProtoMessage() + func (x *TypeProto_SparseTensor) GetElemType() int32 + func (x *TypeProto_SparseTensor) GetShape() *TensorShapeProto + func (x *TypeProto_SparseTensor) ProtoReflect() protoreflect.Message + func (x *TypeProto_SparseTensor) Reset() + func (x *TypeProto_SparseTensor) String() string + type TypeProto_SparseTensorType struct + SparseTensorType *TypeProto_SparseTensor + type TypeProto_Tensor struct + ElemType int32 + Shape *TensorShapeProto + func (*TypeProto_Tensor) Descriptor() ([]byte, []int) + func (*TypeProto_Tensor) ProtoMessage() + func (x *TypeProto_Tensor) GetElemType() int32 + func (x *TypeProto_Tensor) GetShape() *TensorShapeProto + func (x *TypeProto_Tensor) ProtoReflect() protoreflect.Message + func (x *TypeProto_Tensor) Reset() + func (x *TypeProto_Tensor) String() string + type TypeProto_TensorType struct + TensorType *TypeProto_Tensor + type ValueInfoProto struct + DocString string + Name string + Type *TypeProto + func (*ValueInfoProto) Descriptor() ([]byte, []int) + func (*ValueInfoProto) ProtoMessage() + func (x *ValueInfoProto) GetDocString() string + func (x *ValueInfoProto) GetName() string + func (x *ValueInfoProto) GetType() *TypeProto + func (x *ValueInfoProto) ProtoReflect() protoreflect.Message + func (x *ValueInfoProto) Reset() + func (x *ValueInfoProto) String() string + type Version int32 + const Version_IR_VERSION + const Version_IR_VERSION_2017_10_10 + const Version_IR_VERSION_2017_10_30 + const Version_IR_VERSION_2017_11_3 + const Version_IR_VERSION_2019_1_22 + const Version_IR_VERSION_2019_3_18 + const Version_IR_VERSION_2019_9_19 + const Version_IR_VERSION_2020_5_8 + const Version__START_VERSION + func (Version) Descriptor() protoreflect.EnumDescriptor + func (Version) EnumDescriptor() ([]byte, []int) + func (Version) Type() protoreflect.EnumType + func (x Version) Enum() *Version + func (x Version) Number() protoreflect.EnumNumber + func (x Version) String() string