Have a question? Connect with the community at the TensorFlow Forum Visit Forum

TensorProto

public final class TensorProto

 Protocol buffer representing a tensor.
 
Protobuf type tensorflow.TensorProto

Nested Classes

class TensorProto.Builder
 Protocol buffer representing a tensor. 

Constants

int BOOL_VAL_FIELD_NUMBER
int DCOMPLEX_VAL_FIELD_NUMBER
int DOUBLE_VAL_FIELD_NUMBER
int DTYPE_FIELD_NUMBER
int FLOAT_VAL_FIELD_NUMBER
int HALF_VAL_FIELD_NUMBER
int INT64_VAL_FIELD_NUMBER
int INT_VAL_FIELD_NUMBER
int RESOURCE_HANDLE_VAL_FIELD_NUMBER
int SCOMPLEX_VAL_FIELD_NUMBER
int STRING_VAL_FIELD_NUMBER
int TENSOR_CONTENT_FIELD_NUMBER
int TENSOR_SHAPE_FIELD_NUMBER
int UINT32_VAL_FIELD_NUMBER
int UINT64_VAL_FIELD_NUMBER
int VARIANT_VAL_FIELD_NUMBER
int VERSION_NUMBER_FIELD_NUMBER

Public Methods

boolean
equals (Object obj)
boolean
getBoolVal (int index)
 DT_BOOL
 
repeated bool bool_val = 11 [packed = true];
int
getBoolValCount ()
 DT_BOOL
 
repeated bool bool_val = 11 [packed = true];
List<Boolean>
getBoolValList ()
 DT_BOOL
 
repeated bool bool_val = 11 [packed = true];
double
getDcomplexVal (int index)
 DT_COMPLEX128.
int
getDcomplexValCount ()
 DT_COMPLEX128.
List<Double>
getDcomplexValList ()
 DT_COMPLEX128.
static TensorProto
TensorProto
final static com.google.protobuf.Descriptors.Descriptor
double
getDoubleVal (int index)
 DT_DOUBLE.
int
getDoubleValCount ()
 DT_DOUBLE.
List<Double>
getDoubleValList ()
 DT_DOUBLE.
DataType
getDtype ()
.tensorflow.DataType dtype = 1;
int
getDtypeValue ()
.tensorflow.DataType dtype = 1;
float
getFloatVal (int index)
 DT_FLOAT.
int
getFloatValCount ()
 DT_FLOAT.
List<Float>
getFloatValList ()
 DT_FLOAT.
int
getHalfVal (int index)
 DT_HALF, DT_BFLOAT16.
int
getHalfValCount ()
 DT_HALF, DT_BFLOAT16.
List<Integer>
getHalfValList ()
 DT_HALF, DT_BFLOAT16.
long
getInt64Val (int index)
 DT_INT64
 
repeated int64 int64_val = 10 [packed = true];
int
getInt64ValCount ()
 DT_INT64
 
repeated int64 int64_val = 10 [packed = true];
List<Long>
getInt64ValList ()
 DT_INT64
 
repeated int64 int64_val = 10 [packed = true];
int
getIntVal (int index)
 DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
int
getIntValCount ()
 DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
List<Integer>
getIntValList ()
 DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
ResourceHandleProto
getResourceHandleVal (int index)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
int
getResourceHandleValCount ()
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
List< ResourceHandleProto >
getResourceHandleValList ()
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
ResourceHandleProtoOrBuilder
getResourceHandleValOrBuilder (int index)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
List<? extends ResourceHandleProtoOrBuilder >
getResourceHandleValOrBuilderList ()
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
float
getScomplexVal (int index)
 DT_COMPLEX64.
int
getScomplexValCount ()
 DT_COMPLEX64.
List<Float>
getScomplexValList ()
 DT_COMPLEX64.
int
com.google.protobuf.ByteString
getStringVal (int index)
 DT_STRING
 
repeated bytes string_val = 8;
int
getStringValCount ()
 DT_STRING
 
repeated bytes string_val = 8;
List<ByteString>
getStringValList ()
 DT_STRING
 
repeated bytes string_val = 8;
com.google.protobuf.ByteString
getTensorContent ()
 Serialized raw tensor content from either Tensor::AsProtoTensorContent or
 memcpy in tensorflow::grpc::EncodeTensorToByteBuffer.
TensorShapeProto
getTensorShape ()
 Shape of the tensor.
TensorShapeProtoOrBuilder
getTensorShapeOrBuilder ()
 Shape of the tensor.
int
getUint32Val (int index)
 DT_UINT32
 
repeated uint32 uint32_val = 16 [packed = true];
int
getUint32ValCount ()
 DT_UINT32
 
repeated uint32 uint32_val = 16 [packed = true];
List<Integer>
getUint32ValList ()
 DT_UINT32
 
repeated uint32 uint32_val = 16 [packed = true];
long
getUint64Val (int index)
 DT_UINT64
 
repeated uint64 uint64_val = 17 [packed = true];
int
getUint64ValCount ()
 DT_UINT64
 
repeated uint64 uint64_val = 17 [packed = true];
List<Long>
getUint64ValList ()
 DT_UINT64
 
repeated uint64 uint64_val = 17 [packed = true];
final com.google.protobuf.UnknownFieldSet
VariantTensorDataProto
getVariantVal (int index)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
int
getVariantValCount ()
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
List< VariantTensorDataProto >
getVariantValList ()
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
VariantTensorDataProtoOrBuilder
getVariantValOrBuilder (int index)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
List<? extends VariantTensorDataProtoOrBuilder >
getVariantValOrBuilderList ()
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
int
getVersionNumber ()
 Version number.
boolean
hasTensorShape ()
 Shape of the tensor.
int
final boolean
static TensorProto.Builder
static TensorProto.Builder
TensorProto.Builder
static TensorProto
parseDelimitedFrom (InputStream input)
static TensorProto
parseDelimitedFrom (InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TensorProto
parseFrom (ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TensorProto
parseFrom (com.google.protobuf.CodedInputStream input)
static TensorProto
parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TensorProto
parseFrom (ByteBuffer data)
static TensorProto
parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TensorProto
parseFrom (com.google.protobuf.ByteString data)
static TensorProto
parseFrom (InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TensorProto
parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static
TensorProto.Builder
void
writeTo (com.google.protobuf.CodedOutputStream output)

Inherited Methods