clase final pública StructuredValue
`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 Clases anidadas
clase | Valor estructurado.Constructor | `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. | |
enumeración | ValorEstructurado.KindCase |
Constantes
entero | BOOL_VALUE_FIELD_NUMBER | |
entero | BOUNDED_TENSOR_SPEC_VALUE_FIELD_NUMBER | |
entero | DICT_VALUE_FIELD_NUMBER | |
entero | FLOAT64_VALUE_FIELD_NUMBER | |
entero | INT64_VALUE_FIELD_NUMBER | |
entero | LIST_VALUE_FIELD_NUMBER | |
entero | NOMBRE_TUPLE_VALUE_FIELD_NUMBER | |
entero | NONE_VALUE_FIELD_NUMBER | |
entero | STRING_VALUE_FIELD_NUMBER | |
entero | TENSOR_DTYPE_VALUE_FIELD_NUMBER | |
entero | TENSOR_SHAPE_VALUE_FIELD_NUMBER | |
entero | TENSOR_SPEC_VALUE_FIELD_NUMBER | |
entero | TUPLE_VALUE_FIELD_NUMBER | |
entero | TYPE_SPEC_VALUE_FIELD_NUMBER |
Métodos públicos
booleano | es igual (Objeto obj) |
booleano | obtenerBoolValue () Represents a boolean value. |
BoundedTensorSpecProto | getBoundedTensorSpecValue () Represents a value for tf.BoundedTensorSpec. |
LimitadoTensorSpecProtoOrBuilder | getBoundedTensorSpecValueOrBuilder () Represents a value for tf.BoundedTensorSpec. |
valor estructurado estático | |
Valor estructurado | |
com.google.protobuf.Descriptors.Descriptor estático final | |
ValorDict | obtenerDictValue () Represents a dict `Value`. |
DictValueOrBuilder | getDictValueOrBuilder () Represents a dict `Value`. |
doble | obtenerFloat64Value () Represents a double-precision floating-point value (a Python `float`). |
largo | obtenerInt64Value () Represents a signed integer value, limited to 64 bits. |
ValorEstructurado.KindCase | |
Valor de lista | obtenerValorLista () Represents a list of `Value`. |
Valor de lista o constructor | getListValueOrBuilder () Represents a list of `Value`. |
ValorTupleNombrado | getNamedTupleValue () Represents Python's namedtuple. |
NamedTupleValueOrBuilder | getNamedTupleValueOrBuilder () Represents Python's namedtuple. |
NingunoValor | obtenerNingunoValor () Represents None. |
NingunoValorOrConstructor | getNoneValueOrBuilder () Represents None. |
entero | |
Cadena | obtenerStringValue () Represents a string of Unicode characters stored in a Python `str`. |
com.google.protobuf.ByteString | obtenerStringValueBytes () Represents a string of Unicode characters stored in a Python `str`. |
Tipo de datos | getTensorDtypeValue () Represents an enum value for dtype. |
entero | getTensorDtypeValueValue () Represents an enum value for dtype. |
TensorShapeProto | obtenerTensorShapeValue () Represents a TensorShape. |
TensorShapeProtoOrBuilder | getTensorShapeValueOrBuilder () Represents a TensorShape. |
TensorSpecProto | obtenerTensorSpecValue () Represents a value for tf.TensorSpec. |
TensorSpecProtoOrBuilder | getTensorSpecValueOrBuilder () Represents a value for tf.TensorSpec. |
ValorTupla | obtenerValorTupla () Represents a tuple of `Value`. |
TupleValueOrBuilder | getTupleValueOrBuilder () Represents a tuple of `Value`. |
TipoSpecProto | getTypeSpecValue () Represents a value for tf.TypeSpec. |
TipoSpecProtoOrBuilder | getTypeSpecValueOrBuilder () Represents a value for tf.TypeSpec. |
com.google.protobuf.UnknownFieldSet final | |
booleano | tieneBoundedTensorSpecValue () Represents a value for tf.BoundedTensorSpec. |
booleano | tieneDictValue () Represents a dict `Value`. |
booleano | tieneListValue () Represents a list of `Value`. |
booleano | tieneNamedTupleValue () Represents Python's namedtuple. |
booleano | no tiene ningún valor () Represents None. |
booleano | tieneTensorShapeValue () Represents a TensorShape. |
booleano | tieneTensorSpecValue () Represents a value for tf.TensorSpec. |
booleano | tieneTupleValue () Represents a tuple of `Value`. |
booleano | tieneTypeSpecValue () Represents a value for tf.TypeSpec. |
entero | código hash () |
booleano final | |
Valor estructurado estático.Builder | newBuilder (prototipo StructuredValue ) |
Valor estructurado estático.Builder | |
Valor estructurado.Constructor | |
valor estructurado estático | parseDelimitedFrom (entrada de InputStream) |
valor estructurado estático | parseDelimitedFrom (entrada de InputStream, com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
valor estructurado estático | parseFrom (datos de ByteBuffer, com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
valor estructurado estático | parseFrom (entrada com.google.protobuf.CodedInputStream) |
valor estructurado estático | parseFrom (byte[] datos, com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
valor estructurado estático | parseFrom (datos de ByteBuffer) |
valor estructurado estático | parseFrom (entrada com.google.protobuf.CodedInputStream, com.google.protobuf.ExtensionRegistryLite extensiónRegistry) |
valor estructurado estático | parseFrom (datos com.google.protobuf.ByteString) |
valor estructurado estático | parseFrom (entrada de InputStream, com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
valor estructurado estático | parseFrom (com.google.protobuf.ByteString datos, com.google.protobuf.ExtensionRegistryLite extensiónRegistry) |
estático | analizador () |
Valor estructurado.Constructor | |
vacío | writeTo (salida de com.google.protobuf.CodedOutputStream) |
Métodos heredados
Constantes
int final estático público BOOL_VALUE_FIELD_NUMBER
Valor constante: 14
int final estático público BOUNDED_TENSOR_SPEC_VALUE_FIELD_NUMBER
Valor constante: 35
int final estático público DICT_VALUE_FIELD_NUMBER
Valor constante: 53
int final estático público FLOAT64_VALUE_FIELD_NUMBER
Valor constante: 11
público estático final int INT64_VALUE_FIELD_NUMBER
Valor constante: 12
int final estático público LIST_VALUE_FIELD_NUMBER
Valor constante: 51
int final estático público NAMED_TUPLE_VALUE_FIELD_NUMBER
Valor constante: 54
int final estático público NONE_VALUE_FIELD_NUMBER
Valor constante: 1
int final estático público STRING_VALUE_FIELD_NUMBER
Valor constante: 13
int final estático público TENSOR_DTYPE_VALUE_FIELD_NUMBER
Valor constante: 32
int final estático público TENSOR_SHAPE_VALUE_FIELD_NUMBER
Valor constante: 31
int final estático público TENSOR_SPEC_VALUE_FIELD_NUMBER
Valor constante: 33
público estático final int TUPLE_VALUE_FIELD_NUMBER
Valor constante: 52
int final estático público TYPE_SPEC_VALUE_FIELD_NUMBER
Valor constante: 34
Métodos públicos
público booleano es igual (Objeto obj)
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 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 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 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 NamedTupleValueOrBuilder getNamedTupleValueOrBuilder ()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
público NingunoValueOrBuilder getNoneValueOrBuilder ()
Represents None.
.tensorflow.NoneValue none_value = 1;
público getParserForType ()
público int getSerializedSize ()
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 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 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 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 TypeSpecProtoOrBuilder getTypeSpecValueOrBuilder ()
Represents a value for tf.TypeSpec.
.tensorflow.TypeSpecProto type_spec_value = 34;
público final com.google.protobuf.UnknownFieldSet getUnknownFields ()
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;
código hash int público ()
público final booleano isInitialized ()
público estático StructuredValue parseDelimitedFrom (entrada de InputStream, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
IOExcepción |
---|
parseFrom público estático StructuredValue (datos ByteBuffer, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
Excepción de buffer de protocolo no válido |
---|
parseFrom público estático StructuredValue (entrada com.google.protobuf.CodedInputStream)
Lanza
IOExcepción |
---|
análisis estático público StructuredValue (byte[] datos, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
Excepción de buffer de protocolo no válido |
---|
parseFrom estático público StructuredValue (datos ByteBuffer)
Lanza
Excepción de buffer de protocolo no válido |
---|
parseFrom de StructuredValue estático público (entrada de com.google.protobuf.CodedInputStream, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
IOExcepción |
---|
parseFrom estático público StructuredValue (datos com.google.protobuf.ByteString)
Lanza
Excepción de buffer de protocolo no válido |
---|
parseFrom de StructuredValue estático público (entrada de InputStream, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
IOExcepción |
---|
parseFrom público estático StructuredValue (datos com.google.protobuf.ByteString, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Lanza
Excepción de buffer de protocolo no válido |
---|
estática pública analizador ()
escritura vacía pública (salida de com.google.protobuf.CodedOutputStream)
Lanza
IOExcepción |
---|