Package org.tensorflow.framework
Interface TensorProtoOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
TensorProto,TensorProto.Builder
public interface TensorProtoOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolVal(int index) DT_BOOLintDT_BOOLDT_BOOLdoublegetDcomplexVal(int index) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.intDT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.doublegetDoubleVal(int index) DT_DOUBLE.intDT_DOUBLE.DT_DOUBLE.getDtype()Data type of the tensor.intData type of the tensor.com.google.protobuf.ByteStringDT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).floatgetFloatVal(int index) DT_FLOAT.intDT_FLOAT.DT_FLOAT.intgetHalfVal(int index) DT_HALF, DT_BFLOAT16.intDT_HALF, DT_BFLOAT16.DT_HALF, DT_BFLOAT16.longgetInt64Val(int index) DT_INT64intDT_INT64DT_INT64intgetIntVal(int index) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.intDT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.getResourceHandleVal(int index) DT_RESOURCEintDT_RESOURCEDT_RESOURCEgetResourceHandleValOrBuilder(int index) DT_RESOURCEList<? extends ResourceHandleProtoOrBuilder> DT_RESOURCEfloatgetScomplexVal(int index) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.intDT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.com.google.protobuf.ByteStringgetStringVal(int index) DT_STRINGintDT_STRINGList<com.google.protobuf.ByteString> DT_STRINGcom.google.protobuf.ByteStringSerialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer.Shape of the tensor.Shape of the tensor.intgetUint32Val(int index) DT_UINT32intDT_UINT32DT_UINT32longgetUint64Val(int index) DT_UINT64intDT_UINT64DT_UINT64getVariantVal(int index) DT_VARIANTintDT_VARIANTDT_VARIANTgetVariantValOrBuilder(int index) DT_VARIANTList<? extends VariantTensorDataProtoOrBuilder> DT_VARIANTintVersion number.booleanShape of the tensor.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDtypeValue
int getDtypeValue()Data type of the tensor.
.tensorflow.DataType dtype = 1;- Returns:
- The enum numeric value on the wire for dtype.
-
getDtype
DataType getDtype()Data type of the tensor.
.tensorflow.DataType dtype = 1;- Returns:
- The dtype.
-
hasTensorShape
boolean hasTensorShape()Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2;- Returns:
- Whether the tensorShape field is set.
-
getTensorShape
TensorShapeProto getTensorShape()Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2;- Returns:
- The tensorShape.
-
getTensorShapeOrBuilder
TensorShapeProtoOrBuilder getTensorShapeOrBuilder()Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2; -
getVersionNumber
int getVersionNumber()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.
int32 version_number = 3;- Returns:
- The versionNumber.
-
getTensorContent
com.google.protobuf.ByteString getTensorContent()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.
bytes tensor_content = 4;- Returns:
- The tensorContent.
-
getHalfValList
DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Returns:
- A list containing the halfVal.
-
getHalfValCount
int getHalfValCount()DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Returns:
- The count of halfVal.
-
getHalfVal
int getHalfVal(int index) DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The halfVal at the given index.
-
getFloatValList
DT_FLOAT.
repeated float float_val = 5 [packed = true];- Returns:
- A list containing the floatVal.
-
getFloatValCount
int getFloatValCount()DT_FLOAT.
repeated float float_val = 5 [packed = true];- Returns:
- The count of floatVal.
-
getFloatVal
float getFloatVal(int index) DT_FLOAT.
repeated float float_val = 5 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The floatVal at the given index.
-
getDoubleValList
DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Returns:
- A list containing the doubleVal.
-
getDoubleValCount
int getDoubleValCount()DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Returns:
- The count of doubleVal.
-
getDoubleVal
double getDoubleVal(int index) DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The doubleVal at the given index.
-
getIntValList
DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Returns:
- A list containing the intVal.
-
getIntValCount
int getIntValCount()DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Returns:
- The count of intVal.
-
getIntVal
int getIntVal(int index) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The intVal at the given index.
-
getStringValList
List<com.google.protobuf.ByteString> getStringValList()DT_STRING
repeated bytes string_val = 8;- Returns:
- A list containing the stringVal.
-
getStringValCount
int getStringValCount()DT_STRING
repeated bytes string_val = 8;- Returns:
- The count of stringVal.
-
getStringVal
com.google.protobuf.ByteString getStringVal(int index) DT_STRING
repeated bytes string_val = 8;- Parameters:
index- The index of the element to return.- Returns:
- The stringVal at the given index.
-
getScomplexValList
DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Returns:
- A list containing the scomplexVal.
-
getScomplexValCount
int getScomplexValCount()DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Returns:
- The count of scomplexVal.
-
getScomplexVal
float getScomplexVal(int index) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The scomplexVal at the given index.
-
getInt64ValList
DT_INT64
repeated int64 int64_val = 10 [packed = true];- Returns:
- A list containing the int64Val.
-
getInt64ValCount
int getInt64ValCount()DT_INT64
repeated int64 int64_val = 10 [packed = true];- Returns:
- The count of int64Val.
-
getInt64Val
long getInt64Val(int index) DT_INT64
repeated int64 int64_val = 10 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The int64Val at the given index.
-
getBoolValList
DT_BOOL
repeated bool bool_val = 11 [packed = true];- Returns:
- A list containing the boolVal.
-
getBoolValCount
int getBoolValCount()DT_BOOL
repeated bool bool_val = 11 [packed = true];- Returns:
- The count of boolVal.
-
getBoolVal
boolean getBoolVal(int index) DT_BOOL
repeated bool bool_val = 11 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The boolVal at the given index.
-
getDcomplexValList
DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Returns:
- A list containing the dcomplexVal.
-
getDcomplexValCount
int getDcomplexValCount()DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Returns:
- The count of dcomplexVal.
-
getDcomplexVal
double getDcomplexVal(int index) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The dcomplexVal at the given index.
-
getResourceHandleValList
List<ResourceHandleProto> getResourceHandleValList()DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleValCount
int getResourceHandleValCount()DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleValOrBuilderList
List<? extends ResourceHandleProtoOrBuilder> getResourceHandleValOrBuilderList()DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleValOrBuilder
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getVariantValList
List<VariantTensorDataProto> getVariantValList()DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantValCount
int getVariantValCount()DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantValOrBuilderList
List<? extends VariantTensorDataProtoOrBuilder> getVariantValOrBuilderList()DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantValOrBuilder
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getUint32ValList
DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Returns:
- A list containing the uint32Val.
-
getUint32ValCount
int getUint32ValCount()DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Returns:
- The count of uint32Val.
-
getUint32Val
int getUint32Val(int index) DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The uint32Val at the given index.
-
getUint64ValList
DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Returns:
- A list containing the uint64Val.
-
getUint64ValCount
int getUint64ValCount()DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Returns:
- The count of uint64Val.
-
getUint64Val
long getUint64Val(int index) DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Parameters:
index- The index of the element to return.- Returns:
- The uint64Val at the given index.
-
getFloat8Val
com.google.protobuf.ByteString getFloat8Val()DT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).
bytes float8_val = 18;- Returns:
- The float8Val.
-