public static final class Struct.StructuredValue.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder> implements Struct.StructuredValueOrBuilder
`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.Protobuf type
tensorflow.StructuredValue
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public Struct.StructuredValue build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public Struct.StructuredValue buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public Struct.StructuredValue.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder mergeFrom(Struct.StructuredValue other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public Struct.StructuredValue.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<Struct.StructuredValue.Builder>
IOException
public Struct.StructuredValue.KindCase getKindCase()
getKindCase
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder clearKind()
public boolean hasNoneValue()
Represents None.
.tensorflow.NoneValue none_value = 1;
hasNoneValue
in interface Struct.StructuredValueOrBuilder
public Struct.NoneValue getNoneValue()
Represents None.
.tensorflow.NoneValue none_value = 1;
getNoneValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setNoneValue(Struct.NoneValue value)
Represents None.
.tensorflow.NoneValue none_value = 1;
public Struct.StructuredValue.Builder setNoneValue(Struct.NoneValue.Builder builderForValue)
Represents None.
.tensorflow.NoneValue none_value = 1;
public Struct.StructuredValue.Builder mergeNoneValue(Struct.NoneValue value)
Represents None.
.tensorflow.NoneValue none_value = 1;
public Struct.StructuredValue.Builder clearNoneValue()
Represents None.
.tensorflow.NoneValue none_value = 1;
public Struct.NoneValue.Builder getNoneValueBuilder()
Represents None.
.tensorflow.NoneValue none_value = 1;
public Struct.NoneValueOrBuilder getNoneValueOrBuilder()
Represents None.
.tensorflow.NoneValue none_value = 1;
getNoneValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public double getFloat64Value()
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;
getFloat64Value
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setFloat64Value(double value)
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;
public Struct.StructuredValue.Builder clearFloat64Value()
Represents a double-precision floating-point value (a Python `float`).
double float64_value = 11;
public long getInt64Value()
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;
getInt64Value
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setInt64Value(long value)
Represents a signed integer value, limited to 64 bits. Larger values from Python's arbitrary-precision integers are unsupported.
sint64 int64_value = 12;
public Struct.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;
public String 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;
getStringValue
in interface Struct.StructuredValueOrBuilder
public 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;
getStringValueBytes
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setStringValue(String value)
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 Struct.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;
public Struct.StructuredValue.Builder setStringValueBytes(com.google.protobuf.ByteString value)
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 boolean getBoolValue()
Represents a boolean value.
bool bool_value = 14;
getBoolValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setBoolValue(boolean value)
Represents a boolean value.
bool bool_value = 14;
public Struct.StructuredValue.Builder clearBoolValue()
Represents a boolean value.
bool bool_value = 14;
public boolean hasTensorShapeValue()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
hasTensorShapeValue
in interface Struct.StructuredValueOrBuilder
public TensorShapeProto getTensorShapeValue()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
getTensorShapeValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setTensorShapeValue(TensorShapeProto value)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
public Struct.StructuredValue.Builder setTensorShapeValue(TensorShapeProto.Builder builderForValue)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
public Struct.StructuredValue.Builder mergeTensorShapeValue(TensorShapeProto value)
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
public Struct.StructuredValue.Builder clearTensorShapeValue()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
public TensorShapeProto.Builder getTensorShapeValueBuilder()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
public TensorShapeProtoOrBuilder getTensorShapeValueOrBuilder()
Represents a TensorShape.
.tensorflow.TensorShapeProto tensor_shape_value = 31;
getTensorShapeValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public int getTensorDtypeValueValue()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
getTensorDtypeValueValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setTensorDtypeValueValue(int value)
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
public DataType getTensorDtypeValue()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
getTensorDtypeValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setTensorDtypeValue(DataType value)
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
public Struct.StructuredValue.Builder clearTensorDtypeValue()
Represents an enum value for dtype.
.tensorflow.DataType tensor_dtype_value = 32;
public boolean hasTensorSpecValue()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
hasTensorSpecValue
in interface Struct.StructuredValueOrBuilder
public Struct.TensorSpecProto getTensorSpecValue()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
getTensorSpecValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setTensorSpecValue(Struct.TensorSpecProto value)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public Struct.StructuredValue.Builder setTensorSpecValue(Struct.TensorSpecProto.Builder builderForValue)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public Struct.StructuredValue.Builder mergeTensorSpecValue(Struct.TensorSpecProto value)
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public Struct.StructuredValue.Builder clearTensorSpecValue()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public Struct.TensorSpecProto.Builder getTensorSpecValueBuilder()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
public Struct.TensorSpecProtoOrBuilder getTensorSpecValueOrBuilder()
Represents a value for tf.TensorSpec.
.tensorflow.TensorSpecProto tensor_spec_value = 33;
getTensorSpecValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public boolean hasListValue()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
hasListValue
in interface Struct.StructuredValueOrBuilder
public Struct.ListValue getListValue()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
getListValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setListValue(Struct.ListValue value)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public Struct.StructuredValue.Builder setListValue(Struct.ListValue.Builder builderForValue)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public Struct.StructuredValue.Builder mergeListValue(Struct.ListValue value)
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public Struct.StructuredValue.Builder clearListValue()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public Struct.ListValue.Builder getListValueBuilder()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
public Struct.ListValueOrBuilder getListValueOrBuilder()
Represents a list of `Value`.
.tensorflow.ListValue list_value = 51;
getListValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public boolean hasTupleValue()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
hasTupleValue
in interface Struct.StructuredValueOrBuilder
public Struct.TupleValue getTupleValue()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
getTupleValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setTupleValue(Struct.TupleValue value)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
public Struct.StructuredValue.Builder setTupleValue(Struct.TupleValue.Builder builderForValue)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
public Struct.StructuredValue.Builder mergeTupleValue(Struct.TupleValue value)
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
public Struct.StructuredValue.Builder clearTupleValue()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
public Struct.TupleValue.Builder getTupleValueBuilder()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
public Struct.TupleValueOrBuilder getTupleValueOrBuilder()
Represents a tuple of `Value`.
.tensorflow.TupleValue tuple_value = 52;
getTupleValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public boolean hasDictValue()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
hasDictValue
in interface Struct.StructuredValueOrBuilder
public Struct.DictValue getDictValue()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
getDictValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setDictValue(Struct.DictValue value)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public Struct.StructuredValue.Builder setDictValue(Struct.DictValue.Builder builderForValue)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public Struct.StructuredValue.Builder mergeDictValue(Struct.DictValue value)
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public Struct.StructuredValue.Builder clearDictValue()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public Struct.DictValue.Builder getDictValueBuilder()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
public Struct.DictValueOrBuilder getDictValueOrBuilder()
Represents a dict `Value`.
.tensorflow.DictValue dict_value = 53;
getDictValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public boolean hasNamedTupleValue()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
hasNamedTupleValue
in interface Struct.StructuredValueOrBuilder
public Struct.NamedTupleValue getNamedTupleValue()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
getNamedTupleValue
in interface Struct.StructuredValueOrBuilder
public Struct.StructuredValue.Builder setNamedTupleValue(Struct.NamedTupleValue value)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public Struct.StructuredValue.Builder setNamedTupleValue(Struct.NamedTupleValue.Builder builderForValue)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public Struct.StructuredValue.Builder mergeNamedTupleValue(Struct.NamedTupleValue value)
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public Struct.StructuredValue.Builder clearNamedTupleValue()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public Struct.NamedTupleValue.Builder getNamedTupleValueBuilder()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
public Struct.NamedTupleValueOrBuilder getNamedTupleValueOrBuilder()
Represents Python's namedtuple.
.tensorflow.NamedTupleValue named_tuple_value = 54;
getNamedTupleValueOrBuilder
in interface Struct.StructuredValueOrBuilder
public final Struct.StructuredValue.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
public final Struct.StructuredValue.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<Struct.StructuredValue.Builder>
Copyright © 2015–2019. All rights reserved.