tensor_go_proto

package
v0.0.0-...-dc2c119 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0, BSD-2-Clause, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tensorflow_core_framework_tensor_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type TensorProto

type TensorProto struct {
	Dtype types_go_proto.DataType `protobuf:"varint,1,opt,name=dtype,proto3,enum=tensorflow.DataType" json:"dtype,omitempty"`
	// Shape of the tensor.  TODO(touts): sort out the 0-rank issues.
	TensorShape *tensor_shape_go_proto.TensorShapeProto `protobuf:"bytes,2,opt,name=tensor_shape,json=tensorShape,proto3" json:"tensor_shape,omitempty"`
	// Version number.
	//
	// In version 0, if the "repeated xxx" representations contain only one
	// element, that element is repeated to fill the shape.  This makes it easy
	// to represent a constant Tensor with a single value.
	VersionNumber int32 `protobuf:"varint,3,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"`
	// Serialized raw tensor content from either Tensor::AsProtoTensorContent or
	// memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation
	// can be used for all tensor types. The purpose of this representation is to
	// reduce serialization overhead during RPC call by avoiding serialization of
	// many repeated small items.
	TensorContent []byte `protobuf:"bytes,4,opt,name=tensor_content,json=tensorContent,proto3" json:"tensor_content,omitempty"`
	// DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll
	// have some pointless zero padding for each value here.
	HalfVal []int32 `protobuf:"varint,13,rep,packed,name=half_val,json=halfVal,proto3" json:"half_val,omitempty"`
	// DT_FLOAT.
	FloatVal []float32 `protobuf:"fixed32,5,rep,packed,name=float_val,json=floatVal,proto3" json:"float_val,omitempty"`
	// DT_DOUBLE.
	DoubleVal []float64 `protobuf:"fixed64,6,rep,packed,name=double_val,json=doubleVal,proto3" json:"double_val,omitempty"`
	// DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
	IntVal []int32 `protobuf:"varint,7,rep,packed,name=int_val,json=intVal,proto3" json:"int_val,omitempty"`
	// DT_STRING
	StringVal [][]byte `protobuf:"bytes,8,rep,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"`
	// DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real
	// and imaginary parts of i-th single precision complex.
	ScomplexVal []float32 `protobuf:"fixed32,9,rep,packed,name=scomplex_val,json=scomplexVal,proto3" json:"scomplex_val,omitempty"`
	// DT_INT64
	Int64Val []int64 `protobuf:"varint,10,rep,packed,name=int64_val,json=int64Val,proto3" json:"int64_val,omitempty"`
	// DT_BOOL
	BoolVal []bool `protobuf:"varint,11,rep,packed,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"`
	// DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real
	// and imaginary parts of i-th double precision complex.
	DcomplexVal []float64 `protobuf:"fixed64,12,rep,packed,name=dcomplex_val,json=dcomplexVal,proto3" json:"dcomplex_val,omitempty"`
	// DT_RESOURCE
	ResourceHandleVal []*resource_handle_go_proto.ResourceHandleProto `protobuf:"bytes,14,rep,name=resource_handle_val,json=resourceHandleVal,proto3" json:"resource_handle_val,omitempty"`
	// DT_VARIANT
	VariantVal []*VariantTensorDataProto `protobuf:"bytes,15,rep,name=variant_val,json=variantVal,proto3" json:"variant_val,omitempty"`
	// DT_UINT32
	Uint32Val []uint32 `protobuf:"varint,16,rep,packed,name=uint32_val,json=uint32Val,proto3" json:"uint32_val,omitempty"`
	// DT_UINT64
	Uint64Val []uint64 `protobuf:"varint,17,rep,packed,name=uint64_val,json=uint64Val,proto3" json:"uint64_val,omitempty"`
	// contains filtered or unexported fields
}

Protocol buffer representing a tensor.

func (*TensorProto) Descriptor deprecated

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

Deprecated: Use TensorProto.ProtoReflect.Descriptor instead.

func (*TensorProto) GetBoolVal

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

func (*TensorProto) GetDcomplexVal

func (x *TensorProto) GetDcomplexVal() []float64

func (*TensorProto) GetDoubleVal

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

func (*TensorProto) GetDtype

func (x *TensorProto) GetDtype() types_go_proto.DataType

func (*TensorProto) GetFloatVal

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

func (*TensorProto) GetHalfVal

func (x *TensorProto) GetHalfVal() []int32

func (*TensorProto) GetInt64Val

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

func (*TensorProto) GetIntVal

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

func (*TensorProto) GetResourceHandleVal

func (x *TensorProto) GetResourceHandleVal() []*resource_handle_go_proto.ResourceHandleProto

func (*TensorProto) GetScomplexVal

func (x *TensorProto) GetScomplexVal() []float32

func (*TensorProto) GetStringVal

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

func (*TensorProto) GetTensorContent

func (x *TensorProto) GetTensorContent() []byte

func (*TensorProto) GetTensorShape

func (x *TensorProto) GetTensorShape() *tensor_shape_go_proto.TensorShapeProto

func (*TensorProto) GetUint32Val

func (x *TensorProto) GetUint32Val() []uint32

func (*TensorProto) GetUint64Val

func (x *TensorProto) GetUint64Val() []uint64

func (*TensorProto) GetVariantVal

func (x *TensorProto) GetVariantVal() []*VariantTensorDataProto

func (*TensorProto) GetVersionNumber

func (x *TensorProto) GetVersionNumber() int32

func (*TensorProto) ProtoMessage

func (*TensorProto) ProtoMessage()

func (*TensorProto) ProtoReflect

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

func (*TensorProto) Reset

func (x *TensorProto) Reset()

func (*TensorProto) String

func (x *TensorProto) String() string

type VariantTensorDataProto

type VariantTensorDataProto struct {

	// Name of the type of objects being serialized.
	TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
	// Portions of the object that are not Tensors.
	Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Tensors contained within objects being serialized.
	Tensors []*TensorProto `protobuf:"bytes,3,rep,name=tensors,proto3" json:"tensors,omitempty"`
	// contains filtered or unexported fields
}

Protocol buffer representing the serialization format of DT_VARIANT tensors.

func (*VariantTensorDataProto) Descriptor deprecated

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

Deprecated: Use VariantTensorDataProto.ProtoReflect.Descriptor instead.

func (*VariantTensorDataProto) GetMetadata

func (x *VariantTensorDataProto) GetMetadata() []byte

func (*VariantTensorDataProto) GetTensors

func (x *VariantTensorDataProto) GetTensors() []*TensorProto

func (*VariantTensorDataProto) GetTypeName

func (x *VariantTensorDataProto) GetTypeName() string

func (*VariantTensorDataProto) ProtoMessage

func (*VariantTensorDataProto) ProtoMessage()

func (*VariantTensorDataProto) ProtoReflect

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

func (*VariantTensorDataProto) Reset

func (x *VariantTensorDataProto) Reset()

func (*VariantTensorDataProto) String

func (x *VariantTensorDataProto) String() string

Jump to

Keyboard shortcuts

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