Package org.tensorflow.framework
Class VariableDef.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<VariableDef.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
org.tensorflow.framework.VariableDef.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,VariableDefOrBuilder
- Enclosing class:
VariableDef
public static final class VariableDef.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
implements VariableDefOrBuilder
Protocol buffer representing a Variable.Protobuf type
tensorflow.VariableDef-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Indicates how a distributed variable will be aggregated.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Name of the initializer op.Name of the tensor holding the variable's initial value.Whether to represent this as a ResourceVariable.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Support for saving variables as slices of a larger variable.Name of the snapshot tensor.Indicates when a distributed variable will be synced.Whether this variable should be trained.Name of the variable tensor.clone()Indicates how a distributed variable will be aggregated.intIndicates how a distributed variable will be aggregated.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorName of the initializer op.com.google.protobuf.ByteStringName of the initializer op.Name of the tensor holding the variable's initial value.com.google.protobuf.ByteStringName of the tensor holding the variable's initial value.booleanWhether to represent this as a ResourceVariable.Support for saving variables as slices of a larger variable.Support for saving variables as slices of a larger variable.Support for saving variables as slices of a larger variable.Name of the snapshot tensor.com.google.protobuf.ByteStringName of the snapshot tensor.Indicates when a distributed variable will be synced.intIndicates when a distributed variable will be synced.booleanWhether this variable should be trained.Name of the variable tensor.com.google.protobuf.ByteStringName of the variable tensor.booleanSupport for saving variables as slices of a larger variable.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(VariableDef other) Support for saving variables as slices of a larger variable.final VariableDef.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Indicates how a distributed variable will be aggregated.setAggregationValue(int value) Indicates how a distributed variable will be aggregated.setInitializerName(String value) Name of the initializer op.setInitializerNameBytes(com.google.protobuf.ByteString value) Name of the initializer op.setInitialValueName(String value) Name of the tensor holding the variable's initial value.setInitialValueNameBytes(com.google.protobuf.ByteString value) Name of the tensor holding the variable's initial value.setIsResource(boolean value) Whether to represent this as a ResourceVariable.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) Support for saving variables as slices of a larger variable.setSaveSliceInfoDef(SaveSliceInfoDef.Builder builderForValue) Support for saving variables as slices of a larger variable.setSnapshotName(String value) Name of the snapshot tensor.setSnapshotNameBytes(com.google.protobuf.ByteString value) Name of the snapshot tensor.Indicates when a distributed variable will be synced.setSynchronizationValue(int value) Indicates when a distributed variable will be synced.setTrainable(boolean value) Whether this variable should be trained.final VariableDef.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setVariableName(String value) Name of the variable tensor.setVariableNameBytes(com.google.protobuf.ByteString value) Name of the variable tensor.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
setField
public VariableDef.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
setRepeatedField
public VariableDef.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
addRepeatedField
public VariableDef.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<VariableDef.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
mergeFrom
public VariableDef.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<VariableDef.Builder>- Throws:
IOException
-
getVariableName
Name of the variable tensor.
string variable_name = 1;- Specified by:
getVariableNamein interfaceVariableDefOrBuilder- Returns:
- The variableName.
-
getVariableNameBytes
public com.google.protobuf.ByteString getVariableNameBytes()Name of the variable tensor.
string variable_name = 1;- Specified by:
getVariableNameBytesin interfaceVariableDefOrBuilder- Returns:
- The bytes for variableName.
-
setVariableName
Name of the variable tensor.
string variable_name = 1;- Parameters:
value- The variableName to set.- Returns:
- This builder for chaining.
-
clearVariableName
Name of the variable tensor.
string variable_name = 1;- Returns:
- This builder for chaining.
-
setVariableNameBytes
Name of the variable tensor.
string variable_name = 1;- Parameters:
value- The bytes for variableName to set.- Returns:
- This builder for chaining.
-
getInitialValueName
Name of the tensor holding the variable's initial value.
string initial_value_name = 6;- Specified by:
getInitialValueNamein interfaceVariableDefOrBuilder- Returns:
- The initialValueName.
-
getInitialValueNameBytes
public com.google.protobuf.ByteString getInitialValueNameBytes()Name of the tensor holding the variable's initial value.
string initial_value_name = 6;- Specified by:
getInitialValueNameBytesin interfaceVariableDefOrBuilder- Returns:
- The bytes for initialValueName.
-
setInitialValueName
Name of the tensor holding the variable's initial value.
string initial_value_name = 6;- Parameters:
value- The initialValueName to set.- Returns:
- This builder for chaining.
-
clearInitialValueName
Name of the tensor holding the variable's initial value.
string initial_value_name = 6;- Returns:
- This builder for chaining.
-
setInitialValueNameBytes
Name of the tensor holding the variable's initial value.
string initial_value_name = 6;- Parameters:
value- The bytes for initialValueName to set.- Returns:
- This builder for chaining.
-
getInitializerName
Name of the initializer op.
string initializer_name = 2;- Specified by:
getInitializerNamein interfaceVariableDefOrBuilder- Returns:
- The initializerName.
-
getInitializerNameBytes
public com.google.protobuf.ByteString getInitializerNameBytes()Name of the initializer op.
string initializer_name = 2;- Specified by:
getInitializerNameBytesin interfaceVariableDefOrBuilder- Returns:
- The bytes for initializerName.
-
setInitializerName
Name of the initializer op.
string initializer_name = 2;- Parameters:
value- The initializerName to set.- Returns:
- This builder for chaining.
-
clearInitializerName
Name of the initializer op.
string initializer_name = 2;- Returns:
- This builder for chaining.
-
setInitializerNameBytes
Name of the initializer op.
string initializer_name = 2;- Parameters:
value- The bytes for initializerName to set.- Returns:
- This builder for chaining.
-
getSnapshotName
Name of the snapshot tensor.
string snapshot_name = 3;- Specified by:
getSnapshotNamein interfaceVariableDefOrBuilder- Returns:
- The snapshotName.
-
getSnapshotNameBytes
public com.google.protobuf.ByteString getSnapshotNameBytes()Name of the snapshot tensor.
string snapshot_name = 3;- Specified by:
getSnapshotNameBytesin interfaceVariableDefOrBuilder- Returns:
- The bytes for snapshotName.
-
setSnapshotName
Name of the snapshot tensor.
string snapshot_name = 3;- Parameters:
value- The snapshotName to set.- Returns:
- This builder for chaining.
-
clearSnapshotName
Name of the snapshot tensor.
string snapshot_name = 3;- Returns:
- This builder for chaining.
-
setSnapshotNameBytes
Name of the snapshot tensor.
string snapshot_name = 3;- Parameters:
value- The bytes for snapshotName to set.- Returns:
- This builder for chaining.
-
hasSaveSliceInfoDef
public boolean hasSaveSliceInfoDef()Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;- Specified by:
hasSaveSliceInfoDefin interfaceVariableDefOrBuilder- Returns:
- Whether the saveSliceInfoDef field is set.
-
getSaveSliceInfoDef
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;- Specified by:
getSaveSliceInfoDefin interfaceVariableDefOrBuilder- Returns:
- The saveSliceInfoDef.
-
setSaveSliceInfoDef
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4; -
setSaveSliceInfoDef
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4; -
mergeSaveSliceInfoDef
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4; -
clearSaveSliceInfoDef
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4; -
getSaveSliceInfoDefBuilder
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4; -
getSaveSliceInfoDefOrBuilder
Support for saving variables as slices of a larger variable.
.tensorflow.SaveSliceInfoDef save_slice_info_def = 4;- Specified by:
getSaveSliceInfoDefOrBuilderin interfaceVariableDefOrBuilder
-
getIsResource
public boolean getIsResource()Whether to represent this as a ResourceVariable.
bool is_resource = 5;- Specified by:
getIsResourcein interfaceVariableDefOrBuilder- Returns:
- The isResource.
-
setIsResource
Whether to represent this as a ResourceVariable.
bool is_resource = 5;- Parameters:
value- The isResource to set.- Returns:
- This builder for chaining.
-
clearIsResource
Whether to represent this as a ResourceVariable.
bool is_resource = 5;- Returns:
- This builder for chaining.
-
getTrainable
public boolean getTrainable()Whether this variable should be trained.
bool trainable = 7;- Specified by:
getTrainablein interfaceVariableDefOrBuilder- Returns:
- The trainable.
-
setTrainable
Whether this variable should be trained.
bool trainable = 7;- Parameters:
value- The trainable to set.- Returns:
- This builder for chaining.
-
clearTrainable
Whether this variable should be trained.
bool trainable = 7;- Returns:
- This builder for chaining.
-
getSynchronizationValue
public int getSynchronizationValue()Indicates when a distributed variable will be synced.
.tensorflow.VariableSynchronization synchronization = 8;- Specified by:
getSynchronizationValuein interfaceVariableDefOrBuilder- Returns:
- The enum numeric value on the wire for synchronization.
-
setSynchronizationValue
Indicates when a distributed variable will be synced.
.tensorflow.VariableSynchronization synchronization = 8;- Parameters:
value- The enum numeric value on the wire for synchronization to set.- Returns:
- This builder for chaining.
-
getSynchronization
Indicates when a distributed variable will be synced.
.tensorflow.VariableSynchronization synchronization = 8;- Specified by:
getSynchronizationin interfaceVariableDefOrBuilder- Returns:
- The synchronization.
-
setSynchronization
Indicates when a distributed variable will be synced.
.tensorflow.VariableSynchronization synchronization = 8;- Parameters:
value- The synchronization to set.- Returns:
- This builder for chaining.
-
clearSynchronization
Indicates when a distributed variable will be synced.
.tensorflow.VariableSynchronization synchronization = 8;- Returns:
- This builder for chaining.
-
getAggregationValue
public int getAggregationValue()Indicates how a distributed variable will be aggregated.
.tensorflow.VariableAggregation aggregation = 9;- Specified by:
getAggregationValuein interfaceVariableDefOrBuilder- Returns:
- The enum numeric value on the wire for aggregation.
-
setAggregationValue
Indicates how a distributed variable will be aggregated.
.tensorflow.VariableAggregation aggregation = 9;- Parameters:
value- The enum numeric value on the wire for aggregation to set.- Returns:
- This builder for chaining.
-
getAggregation
Indicates how a distributed variable will be aggregated.
.tensorflow.VariableAggregation aggregation = 9;- Specified by:
getAggregationin interfaceVariableDefOrBuilder- Returns:
- The aggregation.
-
setAggregation
Indicates how a distributed variable will be aggregated.
.tensorflow.VariableAggregation aggregation = 9;- Parameters:
value- The aggregation to set.- Returns:
- This builder for chaining.
-
clearAggregation
Indicates how a distributed variable will be aggregated.
.tensorflow.VariableAggregation aggregation = 9;- Returns:
- This builder for chaining.
-
setUnknownFields
public final VariableDef.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-
mergeUnknownFields
public final VariableDef.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<VariableDef.Builder>
-