clase final estática pública StructuredValue.Builder
`StructuredValue` represents a dynamically typed value representing various data structures that are inspired by Python data structures typically used in TensorFlow functions as inputs and outputs. For example when saving a Layer there may be a `training` argument. If the user passes a boolean True/False, that switches between two concrete TensorFlow functions. In order to switch between them in the same way after loading the SavedModel, we need to represent "True" and "False". A more advanced example might be a function which takes a list of dictionaries mapping from strings to Tensors. In order to map from user-specified arguments `[{"a": tf.constant(1.)}, {"q": tf.constant(3.)}]` after load to the right saved TensorFlow function, we need to represent the nested structure and the strings, recording that we have a trace for anything matching `[{"a": tf.TensorSpec(None, tf.float32)}, {"q": tf.TensorSpec([], tf.float64)}]` as an example. Likewise functions may return nested structures of Tensors, for example returning a dictionary mapping from strings to Tensors. In order for the loaded function to return the same structure we need to serialize it. This is an ergonomic aid for working with loaded SavedModels, not a promise to serialize all possible function signatures. For example we do not expect to pickle generic Python objects, and ideally we'd stay language-agnostic.
tensorflow.StructuredValue
tipo Protobuf.StructuredValue Métodos públicos
Métodos heredados
Métodos públicos
public StructuredValue.Builder addRepeatedField (campo com.google.protobuf.Descriptors.FieldDescriptor, valor del objeto)
public StructuredValue.Builder clearBoundedTensorSpecValue ()
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
público StructuredValue.Builder clearDictValue ()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
público StructuredValue.Builder clearFloat64Value ()
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;
público StructuredValue.Builder clearInt64Value ()
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;
público StructuredValue.Builder clearListValue ()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
público StructuredValue.Builder clearNamedTupleValue ()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público StructuredValue.Builder clearNoneValue ()
Represents None.
.tensorflow.NoneValue none_value = 1;
público StructuredValue.Builder clearStringValue ()
Represents a string of Unicode characters stored in a Python `str`. In Python 3, this is exactly what type `str` is. In Python 2, this is the UTF-8 encoding of the characters. For strings with ASCII characters only (as often used in TensorFlow code) there is effectively no difference between the language versions. The obsolescent `unicode` type of Python 2 is not supported here.
string string_value = 13;
público StructuredValue.Builder clearTensorDtypeValue ()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
público StructuredValue.Builder clearTensorShapeValue ()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
público StructuredValue.Builder clearTensorSpecValue ()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
público StructuredValue.Builder clearTupleValue ()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
público StructuredValue.Builder clearTypeSpecValue ()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
getBoolValue público booleano ()
Represents a boolean value.
bool bool_value = 14;
público BoundedTensorSpecProto getBoundedTensorSpecValue ()
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
público BoundedTensorSpecProto.Builder getBoundedTensorSpecValueBuilder ()
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
público BoundedTensorSpecProtoOrBuilder getBoundedTensorSpecValueOrBuilder ()
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
público estático final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
público com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
público DictValue.Builder getDictValueBuilder ()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
público DictValueOrBuilder getDictValueOrBuilder ()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
público doble getFloat64Value ()
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;
público largo getInt64Value ()
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;
valor de lista público getListValue ()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
público ListValue.Builder getListValueBuilder ()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
público ListValueOrBuilder getListValueOrBuilder ()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
público NamedTupleValue getNamedTupleValue ()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público NamedTupleValue.Builder getNamedTupleValueBuilder ()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público NamedTupleValueOrBuilder getNamedTupleValueOrBuilder ()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público NoneValue.Builder getNoneValueBuilder ()
Represents None.
.tensorflow.NoneValue none_value = 1;
público NingunoValueOrBuilder getNoneValueOrBuilder ()
Represents None.
.tensorflow.NoneValue none_value = 1;
cadena pública getStringValue ()
Represents a string of Unicode characters stored in a Python `str`. In Python 3, this is exactly what type `str` is. In Python 2, this is the UTF-8 encoding of the characters. For strings with ASCII characters only (as often used in TensorFlow code) there is effectively no difference between the language versions. The obsolescent `unicode` type of Python 2 is not supported here.
string string_value = 13;
público com.google.protobuf.ByteString getStringValueBytes ()
Represents a string of Unicode characters stored in a Python `str`. In Python 3, this is exactly what type `str` is. In Python 2, this is the UTF-8 encoding of the characters. For strings with ASCII characters only (as often used in TensorFlow code) there is effectively no difference between the language versions. The obsolescent `unicode` type of Python 2 is not supported here.
string string_value = 13;
Tipo de datos público getTensorDtypeValue ()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
público int getTensorDtypeValueValue ()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
público TensorShapeProto getTensorShapeValue ()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
público TensorShapeProto.Builder getTensorShapeValueBuilder ()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
público TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder ()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
TensorSpecPro público para obtener TensorSpecValue ()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
público TensorSpecProto.Builder getTensorSpecValueBuilder ()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
público TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder ()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
público TupleValue getTupleValue ()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
público TupleValue.Builder getTupleValueBuilder ()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
público TupleValueOrBuilder getTupleValueOrBuilder ()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
TypeSpecPro público para obtenerTypeSpecValue ()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
público TypeSpecProto.Builder getTypeSpecValueBuilder ()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
público TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder ()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
público booleano hasBoundedTensorSpecValue ()
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
hasDictValue público booleano ()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
hasListValue público booleano ()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
hasNamedTupleValue público booleano ()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público booleano hasNoneValue ()
Represents None.
.tensorflow.NoneValue none_value = 1;
hasTensorShapeValue booleano público ()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
hasTensorSpecValue público booleano ()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
hasTupleValue público booleano ()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
hasTypeSpecValue público booleano ()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
público final booleano isInitialized ()
public StructuredValue.Builder mergeBoundedTensorSpecValue (valor BoundedTensorSpecProto )
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
public StructuredValue.Builder mergeDictValue (valor DictValue )
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public StructuredValue.Builder mergeFrom (entrada com.google.protobuf.CodedInputStream, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
IOExcepción |
---|
public StructuredValue.Builder mergeListValue (valor ListValue )
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public StructuredValue.Builder mergeNamedTupleValue (valor NamedTupleValue )
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public StructuredValue.Builder mergeNoneValue (valor NingunoValue )
Represents None.
.tensorflow.NoneValue none_value = 1;
public StructuredValue.Builder mergeTensorShapeValue (valor TensorShapeProto )
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
public StructuredValue.Builder mergeTensorSpecValue (valor TensorSpecProto )
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public StructuredValue.Builder mergeTupleValue (valor TupleValue )
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
public StructuredValue.Builder mergeTypeSpecValue (valor TypeSpecProto )
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
público final StructuredValue.Builder mergeUnknownFields (com.google.protobuf.UnknownFieldSet desconocidoFields)
público StructuredValue.Builder setBoolValue (valor booleano)
Represents a boolean value.
bool bool_value = 14;
público StructuredValue.Builder setBoundedTensorSpecValue (valor BoundedTensorSpecProto )
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
público StructuredValue.Builder setBoundedTensorSpecValue ( BoundedTensorSpecProto.Builder builderForValue)
Represents a value for tf.BoundedTensorSpec.
.tensorflow.BoundedTensorSpecProto bounded_tensor_spec_value = 35;
público StructuredValue.Builder setDictValue ( DictValue.Builder builderForValue)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
público StructuredValue.Builder setDictValue (valor DictValue )
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public StructuredValue.Builder setField (campo com.google.protobuf.Descriptors.FieldDescriptor, valor del objeto)
public StructuredValue.Builder setFloat64Value (valor doble)
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;
público StructuredValue.Builder setInt64Value (valor largo)
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;
público StructuredValue.Builder setListValue ( ListValue.Builder builderForValue)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public StructuredValue.Builder setListValue (valor ListValue )
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
público StructuredValue.Builder setNamedTupleValue ( NamedTupleValue.Builder builderForValue)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público StructuredValue.Builder setNamedTupleValue (valor NamedTupleValue )
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public StructuredValue.Builder setNoneValue ( NoneValue.Builder builderForValue)
Represents None.
.tensorflow.NoneValue none_value = 1;
public StructuredValue.Builder setNoneValue (valor NingunoValue )
Represents None.
.tensorflow.NoneValue none_value = 1;
público StructuredValue.Builder setRepeatedField (campo com.google.protobuf.Descriptors.FieldDescriptor, índice int, valor del objeto)
público StructuredValue.Builder setStringValue (valor de cadena)
Represents a string of Unicode characters stored in a Python `str`. In Python 3, this is exactly what type `str` is. In Python 2, this is the UTF-8 encoding of the characters. For strings with ASCII characters only (as often used in TensorFlow code) there is effectively no difference between the language versions. The obsolescent `unicode` type of Python 2 is not supported here.
string string_value = 13;
público StructuredValue.Builder setStringValueBytes (valor com.google.protobuf.ByteString)
Represents a string of Unicode characters stored in a Python `str`. In Python 3, this is exactly what type `str` is. In Python 2, this is the UTF-8 encoding of the characters. For strings with ASCII characters only (as often used in TensorFlow code) there is effectively no difference between the language versions. The obsolescent `unicode` type of Python 2 is not supported here.
string string_value = 13;
public StructuredValue.Builder setTensorDtypeValue (valor de tipo de datos )
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
público StructuredValue.Builder setTensorDtypeValueValue (valor int)
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
público StructuredValue.Builder setTensorShapeValue ( TensorShapeProto.Builder builderForValue)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
público StructuredValue.Builder setTensorShapeValue (valor TensorShapeProto )
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
público StructuredValue.Builder setTensorSpecValue ( TensorSpecProto.Builder builderForValue)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public StructuredValue.Builder setTensorSpecValue (valor TensorSpecProto )
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public StructuredValue.Builder setTupleValue (valor TupleValue )
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
público StructuredValue.Builder setTupleValue ( TupleValue.Builder builderForValue)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
público StructuredValue.Builder setTypeSpecValue ( TypeSpecProto.Builder builderForValue)
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
public StructuredValue.Builder setTypeSpecValue (valor TypeSpecProto )
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;