TensorProto.Builder

Stay organized with collections Save and categorize content based on your preferences.
public static final class TensorProto.Builder

 Protocol buffer representing a tensor.
 
Protobuf type tensorflow.TensorProto

Public Methods

TensorProto.Builder
addAllBoolVal(Iterable<? extends Boolean> values)
 DT_BOOL
 
repeated bool bool_val = 11 [packed = true];
TensorProto.Builder
addAllDcomplexVal(Iterable<? extends Double> values)
 DT_COMPLEX128.
TensorProto.Builder
addAllDoubleVal(Iterable<? extends Double> values)
 DT_DOUBLE.
TensorProto.Builder
addAllFloatVal(Iterable<? extends Float> values)
 DT_FLOAT.
TensorProto.Builder
addAllHalfVal(Iterable<? extends Integer> values)
 DT_HALF, DT_BFLOAT16.
TensorProto.Builder
addAllInt64Val(Iterable<? extends Long> values)
 DT_INT64
 
repeated int64 int64_val = 10 [packed = true];
TensorProto.Builder
addAllIntVal(Iterable<? extends Integer> values)
 DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
TensorProto.Builder
addAllResourceHandleVal(Iterable<? extends ResourceHandleProto> values)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
TensorProto.Builder
addAllScomplexVal(Iterable<? extends Float> values)
 DT_COMPLEX64.
TensorProto.Builder
addAllStringVal(Iterable<? extends ByteString> values)
 DT_STRING
 
repeated bytes string_val = 8;
TensorProto.Builder
addAllUint32Val(Iterable<? extends Integer> values)
 DT_UINT32
 
repeated uint32 uint32_val = 16 [packed = true];
TensorProto.Builder
addAllUint64Val(Iterable<? extends Long> values)
 DT_UINT64
 
repeated uint64 uint64_val = 17 [packed = true];
TensorProto.Builder
addAllVariantVal(Iterable<? extends VariantTensorDataProto> values)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
TensorProto.Builder
addBoolVal(boolean value)
 DT_BOOL
 
repeated bool bool_val = 11 [packed = true];
TensorProto.Builder
addDcomplexVal(double value)
 DT_COMPLEX128.
TensorProto.Builder
addDoubleVal(double value)
 DT_DOUBLE.
TensorProto.Builder
addFloatVal(float value)
 DT_FLOAT.
TensorProto.Builder
addHalfVal(int value)
 DT_HALF, DT_BFLOAT16.
TensorProto.Builder
addInt64Val(long value)
 DT_INT64
 
repeated int64 int64_val = 10 [packed = true];
TensorProto.Builder
addIntVal(int value)
 DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
TensorProto.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TensorProto.Builder
addResourceHandleVal(int index, ResourceHandleProto.Builder builderForValue)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
TensorProto.Builder
addResourceHandleVal(int index, ResourceHandleProto value)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
TensorProto.Builder
addResourceHandleVal(ResourceHandleProto value)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
TensorProto.Builder
addResourceHandleVal(ResourceHandleProto.Builder builderForValue)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
ResourceHandleProto.Builder
addResourceHandleValBuilder(int index)
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
ResourceHandleProto.Builder
addResourceHandleValBuilder()
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
TensorProto.Builder
addScomplexVal(float value)
 DT_COMPLEX64.
TensorProto.Builder
addStringVal(com.google.protobuf.ByteString value)
 DT_STRING
 
repeated bytes string_val = 8;
TensorProto.Builder
addUint32Val(int value)
 DT_UINT32
 
repeated uint32 uint32_val = 16 [packed = true];
TensorProto.Builder
addUint64Val(long value)
 DT_UINT64
 
repeated uint64 uint64_val = 17 [packed = true];
TensorProto.Builder
addVariantVal(VariantTensorDataProto value)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
TensorProto.Builder
addVariantVal(int index, VariantTensorDataProto.Builder builderForValue)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
TensorProto.Builder
addVariantVal(int index, VariantTensorDataProto value)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
TensorProto.Builder
addVariantVal(VariantTensorDataProto.Builder builderForValue)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
VariantTensorDataProto.Builder
addVariantValBuilder(int index)
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
VariantTensorDataProto.Builder
addVariantValBuilder()
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
TensorProto
build()
TensorProto
TensorProto.Builder
clear()
TensorProto.Builder
clearBoolVal()
 DT_BOOL
 
repeated bool bool_val = 11 [packed = true];
TensorProto.Builder
clearDcomplexVal()
 DT_COMPLEX128.
TensorProto.Builder
clearDoubleVal()
 DT_DOUBLE.
TensorProto.Builder
clearDtype()
.tensorflow.DataType dtype = 1;
TensorProto.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
TensorProto.Builder
clearFloatVal()
 DT_FLOAT.
TensorProto.Builder
clearHalfVal()
 DT_HALF, DT_BFLOAT16.
TensorProto.Builder
clearInt64Val()
 DT_INT64
 
repeated int64 int64_val = 10 [packed = true];
TensorProto.Builder
clearIntVal()
 DT_INT32, DT_INT16, DT_INT8, DT_UINT8.
TensorProto.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
TensorProto.Builder
clearResourceHandleVal()
 DT_RESOURCE
 
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;
TensorProto.Builder
clearScomplexVal()
 DT_COMPLEX64.
TensorProto.Builder
clearStringVal()
 DT_STRING
 
repeated bytes string_val = 8;
TensorProto.Builder
clearTensorContent()
 Serialized raw tensor content from either Tensor::AsProtoTensorContent or
 memcpy in tensorflow::grpc::EncodeTensorToByteBuffer.
TensorProto.Builder
clearTensorShape()
 Shape of the tensor.
TensorProto.Builder
clearUint32Val()
 DT_UINT32
 
repeated uint32 uint32_val = 16 [packed = true];
TensorProto.Builder
clearUint64Val()
 DT_UINT64
 
repeated uint64 uint64_val = 17 [packed = true];
TensorProto.Builder
clearVariantVal()
 DT_VARIANT
 
repeated .tensorflow.VariantTensorDataProto variant_val = 15;
TensorProto.Builder
clearVersionNumber()
 Version number.
TensorProto.Builder
clone()
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.
TensorProto
final static com.google.protobuf.Descriptors.Descriptor
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