tensorflow

package
v0.0.0-...-3233e8b Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpSet_name = map[int32]string{
		0: "OP_SET_UNSPECIFIED",
		1: "TF",
		2: "XLA",
		3: "UNIFORM_QUANTIZED",
	}
	OpSet_value = map[string]int32{
		"OP_SET_UNSPECIFIED": 0,
		"TF":                 1,
		"XLA":                2,
		"UNIFORM_QUANTIZED":  3,
	}
)

Enum value maps for OpSet.

View Source
var (
	QuantizationMethod_Method_name = map[int32]string{
		0: "METHOD_UNSPECIFIED",
	}
	QuantizationMethod_Method_value = map[string]int32{
		"METHOD_UNSPECIFIED": 0,
	}
)

Enum value maps for QuantizationMethod_Method.

View Source
var (
	QuantizationMethod_ExperimentalMethod_name = map[int32]string{
		0: "EXPERIMENTAL_METHOD_UNSPECIFIED",
		1: "STATIC_RANGE",
		2: "DYNAMIC_RANGE",
	}
	QuantizationMethod_ExperimentalMethod_value = map[string]int32{
		"EXPERIMENTAL_METHOD_UNSPECIFIED": 0,
		"STATIC_RANGE":                    1,
		"DYNAMIC_RANGE":                   2,
	}
)

Enum value maps for QuantizationMethod_ExperimentalMethod.

View Source
var File_tensorflow_compiler_mlir_quantization_tensorflow_quantization_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type OpSet

type OpSet int32

List of supported opsets to deploy the quantized model. The quantized model contains different set of ops depending on the opset.

const (
	OpSet_OP_SET_UNSPECIFIED OpSet = 0 // go/do-include-enum-unspecified
	// Uses TF ops that mimic quantization behavior. Used when the corresponding
	// integer op is not yet present.
	OpSet_TF OpSet = 1
	// Uses TF XLA ops
	OpSet_XLA OpSet = 2
	// Uses TF Uniform Quantized ops
	OpSet_UNIFORM_QUANTIZED OpSet = 3
)

func (OpSet) Descriptor

func (OpSet) Descriptor() protoreflect.EnumDescriptor

func (OpSet) Enum

func (x OpSet) Enum() *OpSet

func (OpSet) EnumDescriptor deprecated

func (OpSet) EnumDescriptor() ([]byte, []int)

Deprecated: Use OpSet.Descriptor instead.

func (OpSet) Number

func (x OpSet) Number() protoreflect.EnumNumber

func (OpSet) String

func (x OpSet) String() string

func (OpSet) Type

func (OpSet) Type() protoreflect.EnumType

type QuantizationMethod

type QuantizationMethod struct {

	// Types that are assignable to MethodOneof:
	//
	//	*QuantizationMethod_Method_
	//	*QuantizationMethod_ExperimentalMethod_
	MethodOneof isQuantizationMethod_MethodOneof `protobuf_oneof:"method_oneof"`
	// contains filtered or unexported fields
}

Model quantization method for optimization.

Various techniques for model quantization are defined within this message along with a field that specifies a method to be used for a particular quantization request.

func (*QuantizationMethod) Descriptor deprecated

func (*QuantizationMethod) Descriptor() ([]byte, []int)

Deprecated: Use QuantizationMethod.ProtoReflect.Descriptor instead.

func (*QuantizationMethod) GetExperimentalMethod

func (x *QuantizationMethod) GetExperimentalMethod() QuantizationMethod_ExperimentalMethod

func (*QuantizationMethod) GetMethod

func (*QuantizationMethod) GetMethodOneof

func (m *QuantizationMethod) GetMethodOneof() isQuantizationMethod_MethodOneof

func (*QuantizationMethod) ProtoMessage

func (*QuantizationMethod) ProtoMessage()

func (*QuantizationMethod) ProtoReflect

func (x *QuantizationMethod) ProtoReflect() protoreflect.Message

func (*QuantizationMethod) Reset

func (x *QuantizationMethod) Reset()

func (*QuantizationMethod) String

func (x *QuantizationMethod) String() string

type QuantizationMethod_ExperimentalMethod

type QuantizationMethod_ExperimentalMethod int32

Experimental quantization methods. These methods are either not implemented or provided with an unstable behavior.

const (
	// This should never be used. Using this will generally result in an error.
	QuantizationMethod_EXPERIMENTAL_METHOD_UNSPECIFIED QuantizationMethod_ExperimentalMethod = 0 // go/do-include-enum-unspecified
	// Static range quantization. Quantized tensor values' ranges are statically
	// determined.
	QuantizationMethod_STATIC_RANGE QuantizationMethod_ExperimentalMethod = 1
	// Dynamic range quantization. Quantized tensor values' ranges are
	// determined in the graph executions. The weights are quantized during
	// conversion.
	QuantizationMethod_DYNAMIC_RANGE QuantizationMethod_ExperimentalMethod = 2
)

func (QuantizationMethod_ExperimentalMethod) Descriptor

func (QuantizationMethod_ExperimentalMethod) Enum

func (QuantizationMethod_ExperimentalMethod) EnumDescriptor deprecated

func (QuantizationMethod_ExperimentalMethod) EnumDescriptor() ([]byte, []int)

Deprecated: Use QuantizationMethod_ExperimentalMethod.Descriptor instead.

func (QuantizationMethod_ExperimentalMethod) Number

func (QuantizationMethod_ExperimentalMethod) String

func (QuantizationMethod_ExperimentalMethod) Type

type QuantizationMethod_ExperimentalMethod_

type QuantizationMethod_ExperimentalMethod_ struct {
	ExperimentalMethod QuantizationMethod_ExperimentalMethod `` /* 152-byte string literal not displayed */
}

type QuantizationMethod_Method

type QuantizationMethod_Method int32

Quantization methods that are supported as a stable API.

const (
	// This should never be used. Using this will generally result in an error.
	QuantizationMethod_METHOD_UNSPECIFIED QuantizationMethod_Method = 0 // go/do-include-enum-unspecified
)

func (QuantizationMethod_Method) Descriptor

func (QuantizationMethod_Method) Enum

func (QuantizationMethod_Method) EnumDescriptor deprecated

func (QuantizationMethod_Method) EnumDescriptor() ([]byte, []int)

Deprecated: Use QuantizationMethod_Method.Descriptor instead.

func (QuantizationMethod_Method) Number

func (QuantizationMethod_Method) String

func (x QuantizationMethod_Method) String() string

func (QuantizationMethod_Method) Type

type QuantizationMethod_Method_

type QuantizationMethod_Method_ struct {
	Method QuantizationMethod_Method `protobuf:"varint,1,opt,name=method,proto3,enum=tensorflow.quantization.QuantizationMethod_Method,oneof"`
}

type QuantizationOptions

type QuantizationOptions struct {
	QuantizationMethod *QuantizationMethod `protobuf:"bytes,1,opt,name=quantization_method,json=quantizationMethod,proto3" json:"quantization_method,omitempty"`
	OpSet              OpSet               `protobuf:"varint,2,opt,name=op_set,json=opSet,proto3,enum=tensorflow.quantization.OpSet" json:"op_set,omitempty"`
	// contains filtered or unexported fields
}

Defines various options to specify and control the behavior of the quantizer.

func (*QuantizationOptions) Descriptor deprecated

func (*QuantizationOptions) Descriptor() ([]byte, []int)

Deprecated: Use QuantizationOptions.ProtoReflect.Descriptor instead.

func (*QuantizationOptions) GetOpSet

func (x *QuantizationOptions) GetOpSet() OpSet

func (*QuantizationOptions) GetQuantizationMethod

func (x *QuantizationOptions) GetQuantizationMethod() *QuantizationMethod

func (*QuantizationOptions) ProtoMessage

func (*QuantizationOptions) ProtoMessage()

func (*QuantizationOptions) ProtoReflect

func (x *QuantizationOptions) ProtoReflect() protoreflect.Message

func (*QuantizationOptions) Reset

func (x *QuantizationOptions) Reset()

func (*QuantizationOptions) String

func (x *QuantizationOptions) String() string

Jump to

Keyboard shortcuts

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