Package org.tensorflow.util
Class SaverDef.Builder
- java.lang.Object
-
- org.nd4j.shade.protobuf.AbstractMessageLite.Builder
-
- org.nd4j.shade.protobuf.AbstractMessage.Builder<BuilderType>
-
- org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
- org.tensorflow.util.SaverDef.Builder
-
- All Implemented Interfaces:
Cloneable
,org.nd4j.shade.protobuf.Message.Builder
,org.nd4j.shade.protobuf.MessageLite.Builder
,org.nd4j.shade.protobuf.MessageLiteOrBuilder
,org.nd4j.shade.protobuf.MessageOrBuilder
,SaverDefOrBuilder
- Enclosing class:
- SaverDef
public static final class SaverDef.Builder extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder> implements SaverDefOrBuilder
Protocol buffer representing the configuration of a Saver.
Protobuf typetensorflow.SaverDef
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SaverDef.Builder
addRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)
SaverDef
build()
SaverDef
buildPartial()
SaverDef.Builder
clear()
SaverDef.Builder
clearField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
SaverDef.Builder
clearFilenameTensorName()
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.SaverDef.Builder
clearKeepCheckpointEveryNHours()
How often to keep an additional checkpoint.SaverDef.Builder
clearMaxToKeep()
Maximum number of checkpoints to keep.SaverDef.Builder
clearOneof(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
SaverDef.Builder
clearRestoreOpName()
The operation to run when restoring a model checkpoint.SaverDef.Builder
clearSaveTensorName()
The operation to run when saving a model checkpoint.SaverDef.Builder
clearSharded()
Shard the save files, one per device that has Variable nodes.SaverDef.Builder
clearVersion()
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
SaverDef.Builder
clone()
SaverDef
getDefaultInstanceForType()
static org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptor()
org.nd4j.shade.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getFilenameTensorName()
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.org.nd4j.shade.protobuf.ByteString
getFilenameTensorNameBytes()
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.float
getKeepCheckpointEveryNHours()
How often to keep an additional checkpoint.int
getMaxToKeep()
Maximum number of checkpoints to keep.String
getRestoreOpName()
The operation to run when restoring a model checkpoint.org.nd4j.shade.protobuf.ByteString
getRestoreOpNameBytes()
The operation to run when restoring a model checkpoint.String
getSaveTensorName()
The operation to run when saving a model checkpoint.org.nd4j.shade.protobuf.ByteString
getSaveTensorNameBytes()
The operation to run when saving a model checkpoint.boolean
getSharded()
Shard the save files, one per device that has Variable nodes.SaverDef.CheckpointFormatVersion
getVersion()
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
int
getVersionValue()
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SaverDef.Builder
mergeFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
SaverDef.Builder
mergeFrom(org.nd4j.shade.protobuf.Message other)
SaverDef.Builder
mergeFrom(SaverDef other)
SaverDef.Builder
mergeUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
SaverDef.Builder
setField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)
SaverDef.Builder
setFilenameTensorName(String value)
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.SaverDef.Builder
setFilenameTensorNameBytes(org.nd4j.shade.protobuf.ByteString value)
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.SaverDef.Builder
setKeepCheckpointEveryNHours(float value)
How often to keep an additional checkpoint.SaverDef.Builder
setMaxToKeep(int value)
Maximum number of checkpoints to keep.SaverDef.Builder
setRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
SaverDef.Builder
setRestoreOpName(String value)
The operation to run when restoring a model checkpoint.SaverDef.Builder
setRestoreOpNameBytes(org.nd4j.shade.protobuf.ByteString value)
The operation to run when restoring a model checkpoint.SaverDef.Builder
setSaveTensorName(String value)
The operation to run when saving a model checkpoint.SaverDef.Builder
setSaveTensorNameBytes(org.nd4j.shade.protobuf.ByteString value)
The operation to run when saving a model checkpoint.SaverDef.Builder
setSharded(boolean value)
Shard the save files, one per device that has Variable nodes.SaverDef.Builder
setUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
SaverDef.Builder
setVersion(SaverDef.CheckpointFormatVersion value)
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
SaverDef.Builder
setVersionValue(int value)
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
-
Methods inherited from class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class org.nd4j.shade.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class org.nd4j.shade.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
clear
public SaverDef.Builder clear()
- Specified by:
clear
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Specified by:
clear
in interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
- Overrides:
clear
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
getDescriptorForType
public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfaceorg.nd4j.shade.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
getDefaultInstanceForType
public SaverDef getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfaceorg.nd4j.shade.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfaceorg.nd4j.shade.protobuf.MessageOrBuilder
-
build
public SaverDef build()
- Specified by:
build
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Specified by:
build
in interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
-
buildPartial
public SaverDef buildPartial()
- Specified by:
buildPartial
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Specified by:
buildPartial
in interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
-
clone
public SaverDef.Builder clone()
- Specified by:
clone
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Specified by:
clone
in interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
- Overrides:
clone
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
setField
public SaverDef.Builder setField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
setField
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
clearField
public SaverDef.Builder clearField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
clearField
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
clearOneof
public SaverDef.Builder clearOneof(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
clearOneof
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
setRepeatedField
public SaverDef.Builder setRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
addRepeatedField
public SaverDef.Builder addRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
mergeFrom
public SaverDef.Builder mergeFrom(org.nd4j.shade.protobuf.Message other)
- Specified by:
mergeFrom
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
mergeFrom
in classorg.nd4j.shade.protobuf.AbstractMessage.Builder<SaverDef.Builder>
-
mergeFrom
public SaverDef.Builder mergeFrom(SaverDef other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfaceorg.nd4j.shade.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
mergeFrom
public SaverDef.Builder mergeFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classorg.nd4j.shade.protobuf.AbstractMessage.Builder<SaverDef.Builder>
- Throws:
IOException
-
getFilenameTensorName
public String getFilenameTensorName()
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.
string filename_tensor_name = 1;
- Specified by:
getFilenameTensorName
in interfaceSaverDefOrBuilder
- Returns:
- The filenameTensorName.
-
getFilenameTensorNameBytes
public org.nd4j.shade.protobuf.ByteString getFilenameTensorNameBytes()
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.
string filename_tensor_name = 1;
- Specified by:
getFilenameTensorNameBytes
in interfaceSaverDefOrBuilder
- Returns:
- The bytes for filenameTensorName.
-
setFilenameTensorName
public SaverDef.Builder setFilenameTensorName(String value)
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.
string filename_tensor_name = 1;
- Parameters:
value
- The filenameTensorName to set.- Returns:
- This builder for chaining.
-
clearFilenameTensorName
public SaverDef.Builder clearFilenameTensorName()
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.
string filename_tensor_name = 1;
- Returns:
- This builder for chaining.
-
setFilenameTensorNameBytes
public SaverDef.Builder setFilenameTensorNameBytes(org.nd4j.shade.protobuf.ByteString value)
The name of the tensor in which to specify the filename when saving or restoring a model checkpoint.
string filename_tensor_name = 1;
- Parameters:
value
- The bytes for filenameTensorName to set.- Returns:
- This builder for chaining.
-
getSaveTensorName
public String getSaveTensorName()
The operation to run when saving a model checkpoint.
string save_tensor_name = 2;
- Specified by:
getSaveTensorName
in interfaceSaverDefOrBuilder
- Returns:
- The saveTensorName.
-
getSaveTensorNameBytes
public org.nd4j.shade.protobuf.ByteString getSaveTensorNameBytes()
The operation to run when saving a model checkpoint.
string save_tensor_name = 2;
- Specified by:
getSaveTensorNameBytes
in interfaceSaverDefOrBuilder
- Returns:
- The bytes for saveTensorName.
-
setSaveTensorName
public SaverDef.Builder setSaveTensorName(String value)
The operation to run when saving a model checkpoint.
string save_tensor_name = 2;
- Parameters:
value
- The saveTensorName to set.- Returns:
- This builder for chaining.
-
clearSaveTensorName
public SaverDef.Builder clearSaveTensorName()
The operation to run when saving a model checkpoint.
string save_tensor_name = 2;
- Returns:
- This builder for chaining.
-
setSaveTensorNameBytes
public SaverDef.Builder setSaveTensorNameBytes(org.nd4j.shade.protobuf.ByteString value)
The operation to run when saving a model checkpoint.
string save_tensor_name = 2;
- Parameters:
value
- The bytes for saveTensorName to set.- Returns:
- This builder for chaining.
-
getRestoreOpName
public String getRestoreOpName()
The operation to run when restoring a model checkpoint.
string restore_op_name = 3;
- Specified by:
getRestoreOpName
in interfaceSaverDefOrBuilder
- Returns:
- The restoreOpName.
-
getRestoreOpNameBytes
public org.nd4j.shade.protobuf.ByteString getRestoreOpNameBytes()
The operation to run when restoring a model checkpoint.
string restore_op_name = 3;
- Specified by:
getRestoreOpNameBytes
in interfaceSaverDefOrBuilder
- Returns:
- The bytes for restoreOpName.
-
setRestoreOpName
public SaverDef.Builder setRestoreOpName(String value)
The operation to run when restoring a model checkpoint.
string restore_op_name = 3;
- Parameters:
value
- The restoreOpName to set.- Returns:
- This builder for chaining.
-
clearRestoreOpName
public SaverDef.Builder clearRestoreOpName()
The operation to run when restoring a model checkpoint.
string restore_op_name = 3;
- Returns:
- This builder for chaining.
-
setRestoreOpNameBytes
public SaverDef.Builder setRestoreOpNameBytes(org.nd4j.shade.protobuf.ByteString value)
The operation to run when restoring a model checkpoint.
string restore_op_name = 3;
- Parameters:
value
- The bytes for restoreOpName to set.- Returns:
- This builder for chaining.
-
getMaxToKeep
public int getMaxToKeep()
Maximum number of checkpoints to keep. If 0, no checkpoints are deleted.
int32 max_to_keep = 4;
- Specified by:
getMaxToKeep
in interfaceSaverDefOrBuilder
- Returns:
- The maxToKeep.
-
setMaxToKeep
public SaverDef.Builder setMaxToKeep(int value)
Maximum number of checkpoints to keep. If 0, no checkpoints are deleted.
int32 max_to_keep = 4;
- Parameters:
value
- The maxToKeep to set.- Returns:
- This builder for chaining.
-
clearMaxToKeep
public SaverDef.Builder clearMaxToKeep()
Maximum number of checkpoints to keep. If 0, no checkpoints are deleted.
int32 max_to_keep = 4;
- Returns:
- This builder for chaining.
-
getSharded
public boolean getSharded()
Shard the save files, one per device that has Variable nodes.
bool sharded = 5;
- Specified by:
getSharded
in interfaceSaverDefOrBuilder
- Returns:
- The sharded.
-
setSharded
public SaverDef.Builder setSharded(boolean value)
Shard the save files, one per device that has Variable nodes.
bool sharded = 5;
- Parameters:
value
- The sharded to set.- Returns:
- This builder for chaining.
-
clearSharded
public SaverDef.Builder clearSharded()
Shard the save files, one per device that has Variable nodes.
bool sharded = 5;
- Returns:
- This builder for chaining.
-
getKeepCheckpointEveryNHours
public float getKeepCheckpointEveryNHours()
How often to keep an additional checkpoint. If not specified, only the last "max_to_keep" checkpoints are kept; if specified, in addition to keeping the last "max_to_keep" checkpoints, an additional checkpoint will be kept for every n hours of training.
float keep_checkpoint_every_n_hours = 6;
- Specified by:
getKeepCheckpointEveryNHours
in interfaceSaverDefOrBuilder
- Returns:
- The keepCheckpointEveryNHours.
-
setKeepCheckpointEveryNHours
public SaverDef.Builder setKeepCheckpointEveryNHours(float value)
How often to keep an additional checkpoint. If not specified, only the last "max_to_keep" checkpoints are kept; if specified, in addition to keeping the last "max_to_keep" checkpoints, an additional checkpoint will be kept for every n hours of training.
float keep_checkpoint_every_n_hours = 6;
- Parameters:
value
- The keepCheckpointEveryNHours to set.- Returns:
- This builder for chaining.
-
clearKeepCheckpointEveryNHours
public SaverDef.Builder clearKeepCheckpointEveryNHours()
How often to keep an additional checkpoint. If not specified, only the last "max_to_keep" checkpoints are kept; if specified, in addition to keeping the last "max_to_keep" checkpoints, an additional checkpoint will be kept for every n hours of training.
float keep_checkpoint_every_n_hours = 6;
- Returns:
- This builder for chaining.
-
getVersionValue
public int getVersionValue()
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
- Specified by:
getVersionValue
in interfaceSaverDefOrBuilder
- Returns:
- The enum numeric value on the wire for version.
-
setVersionValue
public SaverDef.Builder setVersionValue(int value)
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
- Parameters:
value
- The enum numeric value on the wire for version to set.- Returns:
- This builder for chaining.
-
getVersion
public SaverDef.CheckpointFormatVersion getVersion()
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
- Specified by:
getVersion
in interfaceSaverDefOrBuilder
- Returns:
- The version.
-
setVersion
public SaverDef.Builder setVersion(SaverDef.CheckpointFormatVersion value)
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
- Parameters:
value
- The version to set.- Returns:
- This builder for chaining.
-
clearVersion
public SaverDef.Builder clearVersion()
.tensorflow.SaverDef.CheckpointFormatVersion version = 7;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final SaverDef.Builder setUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
mergeUnknownFields
public final SaverDef.Builder mergeUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfaceorg.nd4j.shade.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<SaverDef.Builder>
-
-