tf_predict_protos

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ArrayDataType_name = map[int32]string{
		0:  "DT_INVALID",
		1:  "DT_FLOAT",
		2:  "DT_DOUBLE",
		3:  "DT_INT32",
		4:  "DT_UINT8",
		5:  "DT_INT16",
		6:  "DT_INT8",
		7:  "DT_STRING",
		8:  "DT_COMPLEX64",
		9:  "DT_INT64",
		10: "DT_BOOL",
		11: "DT_QINT8",
		12: "DT_QUINT8",
		13: "DT_QINT32",
		14: "DT_BFLOAT16",
		15: "DT_QINT16",
		16: "DT_QUINT16",
		17: "DT_UINT16",
		18: "DT_COMPLEX128",
		19: "DT_HALF",
		20: "DT_RESOURCE",
		21: "DT_VARIANT",
	}
	ArrayDataType_value = map[string]int32{
		"DT_INVALID":    0,
		"DT_FLOAT":      1,
		"DT_DOUBLE":     2,
		"DT_INT32":      3,
		"DT_UINT8":      4,
		"DT_INT16":      5,
		"DT_INT8":       6,
		"DT_STRING":     7,
		"DT_COMPLEX64":  8,
		"DT_INT64":      9,
		"DT_BOOL":       10,
		"DT_QINT8":      11,
		"DT_QUINT8":     12,
		"DT_QINT32":     13,
		"DT_BFLOAT16":   14,
		"DT_QINT16":     15,
		"DT_QUINT16":    16,
		"DT_UINT16":     17,
		"DT_COMPLEX128": 18,
		"DT_HALF":       19,
		"DT_RESOURCE":   20,
		"DT_VARIANT":    21,
	}
)

Enum value maps for ArrayDataType.

View Source
var File_tf_predict_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ArrayDataType

type ArrayDataType int32
const (
	// Not a legal value for DataType. Used to indicate a DataType field
	// has not been set.
	ArrayDataType_DT_INVALID ArrayDataType = 0
	// Data types that all computation devices are expected to be
	// capable to support.
	ArrayDataType_DT_FLOAT      ArrayDataType = 1
	ArrayDataType_DT_DOUBLE     ArrayDataType = 2
	ArrayDataType_DT_INT32      ArrayDataType = 3
	ArrayDataType_DT_UINT8      ArrayDataType = 4
	ArrayDataType_DT_INT16      ArrayDataType = 5
	ArrayDataType_DT_INT8       ArrayDataType = 6
	ArrayDataType_DT_STRING     ArrayDataType = 7
	ArrayDataType_DT_COMPLEX64  ArrayDataType = 8 // Single-precision complex
	ArrayDataType_DT_INT64      ArrayDataType = 9
	ArrayDataType_DT_BOOL       ArrayDataType = 10
	ArrayDataType_DT_QINT8      ArrayDataType = 11 // Quantized int8
	ArrayDataType_DT_QUINT8     ArrayDataType = 12 // Quantized uint8
	ArrayDataType_DT_QINT32     ArrayDataType = 13 // Quantized int32
	ArrayDataType_DT_BFLOAT16   ArrayDataType = 14 // Float32 truncated to 16 bits.  Only for cast ops.
	ArrayDataType_DT_QINT16     ArrayDataType = 15 // Quantized int16
	ArrayDataType_DT_QUINT16    ArrayDataType = 16 // Quantized uint16
	ArrayDataType_DT_UINT16     ArrayDataType = 17
	ArrayDataType_DT_COMPLEX128 ArrayDataType = 18 // Double-precision complex
	ArrayDataType_DT_HALF       ArrayDataType = 19
	ArrayDataType_DT_RESOURCE   ArrayDataType = 20
	ArrayDataType_DT_VARIANT    ArrayDataType = 21 // Arbitrary C++ data types
)

func (ArrayDataType) Descriptor

func (ArrayDataType) Enum

func (x ArrayDataType) Enum() *ArrayDataType

func (ArrayDataType) EnumDescriptor deprecated

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

Deprecated: Use ArrayDataType.Descriptor instead.

func (ArrayDataType) Number

func (ArrayDataType) String

func (x ArrayDataType) String() string

func (ArrayDataType) Type

type ArrayProto

type ArrayProto struct {

	// Data Type.
	Dtype ArrayDataType `protobuf:"varint,1,opt,name=dtype,proto3,enum=tf_predict_protos.ArrayDataType" json:"dtype,omitempty"`
	// Shape of the array.
	ArrayShape *ArrayShape `protobuf:"bytes,2,opt,name=array_shape,json=arrayShape,proto3" json:"array_shape,omitempty"`
	// DT_FLOAT.
	FloatVal []float32 `protobuf:"fixed32,3,rep,packed,name=float_val,json=floatVal,proto3" json:"float_val,omitempty"`
	// DT_DOUBLE.
	DoubleVal []float64 `protobuf:"fixed64,4,rep,packed,name=double_val,json=doubleVal,proto3" json:"double_val,omitempty"`
	// DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
	IntVal []int32 `protobuf:"varint,5,rep,packed,name=int_val,json=intVal,proto3" json:"int_val,omitempty"`
	// DT_STRING.
	StringVal [][]byte `protobuf:"bytes,6,rep,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"`
	// DT_INT64.
	Int64Val []int64 `protobuf:"varint,7,rep,packed,name=int64_val,json=int64Val,proto3" json:"int64_val,omitempty"`
	// DT_BOOL.
	BoolVal []bool `protobuf:"varint,8,rep,packed,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"`
	// contains filtered or unexported fields
}

Protocol buffer representing an array

func (*ArrayProto) Descriptor deprecated

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

Deprecated: Use ArrayProto.ProtoReflect.Descriptor instead.

func (*ArrayProto) GetArrayShape

func (x *ArrayProto) GetArrayShape() *ArrayShape

func (*ArrayProto) GetBoolVal

func (x *ArrayProto) GetBoolVal() []bool

func (*ArrayProto) GetDoubleVal

func (x *ArrayProto) GetDoubleVal() []float64

func (*ArrayProto) GetDtype

func (x *ArrayProto) GetDtype() ArrayDataType

func (*ArrayProto) GetFloatVal

func (x *ArrayProto) GetFloatVal() []float32

func (*ArrayProto) GetInt64Val

func (x *ArrayProto) GetInt64Val() []int64

func (*ArrayProto) GetIntVal

func (x *ArrayProto) GetIntVal() []int32

func (*ArrayProto) GetStringVal

func (x *ArrayProto) GetStringVal() [][]byte

func (*ArrayProto) ProtoMessage

func (*ArrayProto) ProtoMessage()

func (*ArrayProto) ProtoReflect

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

func (*ArrayProto) Reset

func (x *ArrayProto) Reset()

func (*ArrayProto) String

func (x *ArrayProto) String() string

type ArrayShape

type ArrayShape struct {
	Dim []int64 `protobuf:"varint,1,rep,packed,name=dim,proto3" json:"dim,omitempty"`
	// contains filtered or unexported fields
}

Dimensions of an array

func (*ArrayShape) Descriptor deprecated

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

Deprecated: Use ArrayShape.ProtoReflect.Descriptor instead.

func (*ArrayShape) GetDim

func (x *ArrayShape) GetDim() []int64

func (*ArrayShape) ProtoMessage

func (*ArrayShape) ProtoMessage()

func (*ArrayShape) ProtoReflect

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

func (*ArrayShape) Reset

func (x *ArrayShape) Reset()

func (*ArrayShape) String

func (x *ArrayShape) String() string

type PredictRequest

type PredictRequest struct {

	// A named signature to evaluate. If unspecified, the default signature
	// will be used
	SignatureName string `protobuf:"bytes,1,opt,name=signature_name,json=signatureName,proto3" json:"signature_name,omitempty"`
	// Input tensors.
	// Names of input tensor are alias names. The mapping from aliases to real
	// input tensor names is expected to be stored as named generic signature
	// under the key "inputs" in the model export.
	// Each alias listed in a generic signature named "inputs" should be provided
	// exactly once in order to run the prediction.
	Inputs map[string]*ArrayProto `` /* 153-byte string literal not displayed */
	// Output filter.
	// Names specified are alias names. The mapping from aliases to real output
	// tensor names is expected to be stored as named generic signature under
	// the key "outputs" in the model export.
	// Only tensors specified here will be run/fetched and returned, with the
	// exception that when none is specified, all tensors specified in the
	// named signature will be run/fetched and returned.
	OutputFilter []string `protobuf:"bytes,3,rep,name=output_filter,json=outputFilter,proto3" json:"output_filter,omitempty"`
	// contains filtered or unexported fields
}

PredictRequest specifies which TensorFlow model to run, as well as how inputs are mapped to tensors and how outputs are filtered before returning to user.

func (*PredictRequest) Descriptor deprecated

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

Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead.

func (*PredictRequest) GetInputs

func (x *PredictRequest) GetInputs() map[string]*ArrayProto

func (*PredictRequest) GetOutputFilter

func (x *PredictRequest) GetOutputFilter() []string

func (*PredictRequest) GetSignatureName

func (x *PredictRequest) GetSignatureName() string

func (*PredictRequest) ProtoMessage

func (*PredictRequest) ProtoMessage()

func (*PredictRequest) ProtoReflect

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

func (*PredictRequest) Reset

func (x *PredictRequest) Reset()

func (*PredictRequest) String

func (x *PredictRequest) String() string

type PredictResponse

type PredictResponse struct {

	// Output tensors.
	Outputs map[string]*ArrayProto `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Response for PredictRequest on successful run.

func (*PredictResponse) Descriptor deprecated

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

Deprecated: Use PredictResponse.ProtoReflect.Descriptor instead.

func (*PredictResponse) GetOutputs

func (x *PredictResponse) GetOutputs() map[string]*ArrayProto

func (*PredictResponse) ProtoMessage

func (*PredictResponse) ProtoMessage()

func (*PredictResponse) ProtoReflect

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

func (*PredictResponse) Reset

func (x *PredictResponse) Reset()

func (*PredictResponse) String

func (x *PredictResponse) String() string

Jump to

Keyboard shortcuts

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