Package onnx
Class OnnxMl.TrainingInfoProto
- java.lang.Object
-
- org.nd4j.shade.protobuf.AbstractMessageLite
-
- org.nd4j.shade.protobuf.AbstractMessage
-
- org.nd4j.shade.protobuf.GeneratedMessageV3
-
- onnx.OnnxMl.TrainingInfoProto
-
- All Implemented Interfaces:
Serializable,OnnxMl.TrainingInfoProtoOrBuilder,org.nd4j.shade.protobuf.Message,org.nd4j.shade.protobuf.MessageLite,org.nd4j.shade.protobuf.MessageLiteOrBuilder,org.nd4j.shade.protobuf.MessageOrBuilder
- Enclosing class:
- OnnxMl
public static final class OnnxMl.TrainingInfoProto extends org.nd4j.shade.protobuf.GeneratedMessageV3 implements OnnxMl.TrainingInfoProtoOrBuilder
Training information TrainingInfoProto stores information for training a model. In particular, this defines two functionalities: an initialization-step and a training-algorithm-step. Initialization resets the model back to its original state as if no training has been performed. Training algorithm improves the model based on input data. The semantics of the initialization-step is that the initializers in ModelProto.graph and in TrainingInfoProto.algorithm are first initialized as specified by the initializers in the graph, and then updated by the "initialization_binding" in every instance in ModelProto.training_info. The field "algorithm" defines a computation graph which represents a training algorithm's step. After the execution of a TrainingInfoProto.algorithm, the initializers specified by "update_binding" may be immediately updated. If the targeted training algorithm contains consecutive update steps (such as block coordinate descent methods), the user needs to create a TrainingInfoProto for each step.
Protobuf typeonnx.TrainingInfoProto- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOnnxMl.TrainingInfoProto.BuilderTraining information TrainingInfoProto stores information for training a model.-
Nested classes/interfaces inherited from class org.nd4j.shade.protobuf.GeneratedMessageV3
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable, org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intALGORITHM_FIELD_NUMBERstatic intINITIALIZATION_BINDING_FIELD_NUMBERstatic intINITIALIZATION_FIELD_NUMBERstatic intUPDATE_BINDING_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)OnnxMl.GraphProtogetAlgorithm()This field represents a training algorithm step.OnnxMl.GraphProtoOrBuildergetAlgorithmOrBuilder()This field represents a training algorithm step.static OnnxMl.TrainingInfoProtogetDefaultInstance()OnnxMl.TrainingInfoProtogetDefaultInstanceForType()static org.nd4j.shade.protobuf.Descriptors.DescriptorgetDescriptor()OnnxMl.GraphProtogetInitialization()This field describes a graph to compute the initial tensors upon starting the training process.OnnxMl.StringStringEntryProtogetInitializationBinding(int index)This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto.intgetInitializationBindingCount()This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto.List<OnnxMl.StringStringEntryProto>getInitializationBindingList()This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto.OnnxMl.StringStringEntryProtoOrBuildergetInitializationBindingOrBuilder(int index)This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto.List<? extends OnnxMl.StringStringEntryProtoOrBuilder>getInitializationBindingOrBuilderList()This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto.OnnxMl.GraphProtoOrBuildergetInitializationOrBuilder()This field describes a graph to compute the initial tensors upon starting the training process.org.nd4j.shade.protobuf.Parser<OnnxMl.TrainingInfoProto>getParserForType()intgetSerializedSize()org.nd4j.shade.protobuf.UnknownFieldSetgetUnknownFields()OnnxMl.StringStringEntryProtogetUpdateBinding(int index)Gradient-based training is usually an iterative procedure.intgetUpdateBindingCount()Gradient-based training is usually an iterative procedure.List<OnnxMl.StringStringEntryProto>getUpdateBindingList()Gradient-based training is usually an iterative procedure.OnnxMl.StringStringEntryProtoOrBuildergetUpdateBindingOrBuilder(int index)Gradient-based training is usually an iterative procedure.List<? extends OnnxMl.StringStringEntryProtoOrBuilder>getUpdateBindingOrBuilderList()Gradient-based training is usually an iterative procedure.booleanhasAlgorithm()This field represents a training algorithm step.inthashCode()booleanhasInitialization()This field describes a graph to compute the initial tensors upon starting the training process.protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static OnnxMl.TrainingInfoProto.BuildernewBuilder()static OnnxMl.TrainingInfoProto.BuildernewBuilder(OnnxMl.TrainingInfoProto prototype)OnnxMl.TrainingInfoProto.BuildernewBuilderForType()protected OnnxMl.TrainingInfoProto.BuildernewBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static OnnxMl.TrainingInfoProtoparseDelimitedFrom(InputStream input)static OnnxMl.TrainingInfoProtoparseDelimitedFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)static OnnxMl.TrainingInfoProtoparseFrom(byte[] data)static OnnxMl.TrainingInfoProtoparseFrom(byte[] data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)static OnnxMl.TrainingInfoProtoparseFrom(InputStream input)static OnnxMl.TrainingInfoProtoparseFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)static OnnxMl.TrainingInfoProtoparseFrom(ByteBuffer data)static OnnxMl.TrainingInfoProtoparseFrom(ByteBuffer data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)static OnnxMl.TrainingInfoProtoparseFrom(org.nd4j.shade.protobuf.ByteString data)static OnnxMl.TrainingInfoProtoparseFrom(org.nd4j.shade.protobuf.ByteString data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)static OnnxMl.TrainingInfoProtoparseFrom(org.nd4j.shade.protobuf.CodedInputStream input)static OnnxMl.TrainingInfoProtoparseFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)static org.nd4j.shade.protobuf.Parser<OnnxMl.TrainingInfoProto>parser()OnnxMl.TrainingInfoProto.BuildertoBuilder()voidwriteTo(org.nd4j.shade.protobuf.CodedOutputStream output)-
Methods inherited from class org.nd4j.shade.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class org.nd4j.shade.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class org.nd4j.shade.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
INITIALIZATION_FIELD_NUMBER
public static final int INITIALIZATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALGORITHM_FIELD_NUMBER
public static final int ALGORITHM_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INITIALIZATION_BINDING_FIELD_NUMBER
public static final int INITIALIZATION_BINDING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UPDATE_BINDING_FIELD_NUMBER
public static final int UPDATE_BINDING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
getUnknownFields
public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfaceorg.nd4j.shade.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
getDescriptor
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
hasInitialization
public boolean hasInitialization()
This field describes a graph to compute the initial tensors upon starting the training process. Initialization graph has no input and can have multiple outputs. Usually, trainable tensors in neural networks are randomly initialized. To achieve that, for each tensor, the user can put a random number operator such as RandomNormal or RandomUniform in TrainingInfoProto.initialization.node and assign its random output to the specific tensor using "initialization_binding". This graph can also set the initializers in "algorithm" in the same TrainingInfoProto; a use case is resetting the number of training iteration to zero. By default, this field is an empty graph and its evaluation does not produce any output. Thus, no initializer would be changed by default.
.onnx.GraphProto initialization = 1;- Specified by:
hasInitializationin interfaceOnnxMl.TrainingInfoProtoOrBuilder- Returns:
- Whether the initialization field is set.
-
getInitialization
public OnnxMl.GraphProto getInitialization()
This field describes a graph to compute the initial tensors upon starting the training process. Initialization graph has no input and can have multiple outputs. Usually, trainable tensors in neural networks are randomly initialized. To achieve that, for each tensor, the user can put a random number operator such as RandomNormal or RandomUniform in TrainingInfoProto.initialization.node and assign its random output to the specific tensor using "initialization_binding". This graph can also set the initializers in "algorithm" in the same TrainingInfoProto; a use case is resetting the number of training iteration to zero. By default, this field is an empty graph and its evaluation does not produce any output. Thus, no initializer would be changed by default.
.onnx.GraphProto initialization = 1;- Specified by:
getInitializationin interfaceOnnxMl.TrainingInfoProtoOrBuilder- Returns:
- The initialization.
-
getInitializationOrBuilder
public OnnxMl.GraphProtoOrBuilder getInitializationOrBuilder()
This field describes a graph to compute the initial tensors upon starting the training process. Initialization graph has no input and can have multiple outputs. Usually, trainable tensors in neural networks are randomly initialized. To achieve that, for each tensor, the user can put a random number operator such as RandomNormal or RandomUniform in TrainingInfoProto.initialization.node and assign its random output to the specific tensor using "initialization_binding". This graph can also set the initializers in "algorithm" in the same TrainingInfoProto; a use case is resetting the number of training iteration to zero. By default, this field is an empty graph and its evaluation does not produce any output. Thus, no initializer would be changed by default.
.onnx.GraphProto initialization = 1;- Specified by:
getInitializationOrBuilderin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
hasAlgorithm
public boolean hasAlgorithm()
This field represents a training algorithm step. Given required inputs, it computes outputs to update initializers in its own or inference graph's initializer lists. In general, this field contains loss node, gradient node, optimizer node, increment of iteration count. An execution of the training algorithm step is performed by executing the graph obtained by combining the inference graph (namely "ModelProto.graph") and the "algorithm" graph. That is, the actual the actual input/initializer/output/node/value_info/sparse_initializer list of the training graph is the concatenation of "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer" and "algorithm.input/initializer/output/node/value_info/sparse_initializer" in that order. This combined graph must satisfy the normal ONNX conditions. Now, let's provide a visualization of graph combination for clarity. Let the inference graph (i.e., "ModelProto.graph") be tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d and the "algorithm" graph be tensor_d -> Add -> tensor_e The combination process results tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e Notice that an input of a node in the "algorithm" graph may reference the output of a node in the inference graph (but not the other way round). Also, inference node cannot reference inputs of "algorithm". With these restrictions, inference graph can always be run independently without training information. By default, this field is an empty graph and its evaluation does not produce any output. Evaluating the default training step never update any initializers..onnx.GraphProto algorithm = 2;- Specified by:
hasAlgorithmin interfaceOnnxMl.TrainingInfoProtoOrBuilder- Returns:
- Whether the algorithm field is set.
-
getAlgorithm
public OnnxMl.GraphProto getAlgorithm()
This field represents a training algorithm step. Given required inputs, it computes outputs to update initializers in its own or inference graph's initializer lists. In general, this field contains loss node, gradient node, optimizer node, increment of iteration count. An execution of the training algorithm step is performed by executing the graph obtained by combining the inference graph (namely "ModelProto.graph") and the "algorithm" graph. That is, the actual the actual input/initializer/output/node/value_info/sparse_initializer list of the training graph is the concatenation of "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer" and "algorithm.input/initializer/output/node/value_info/sparse_initializer" in that order. This combined graph must satisfy the normal ONNX conditions. Now, let's provide a visualization of graph combination for clarity. Let the inference graph (i.e., "ModelProto.graph") be tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d and the "algorithm" graph be tensor_d -> Add -> tensor_e The combination process results tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e Notice that an input of a node in the "algorithm" graph may reference the output of a node in the inference graph (but not the other way round). Also, inference node cannot reference inputs of "algorithm". With these restrictions, inference graph can always be run independently without training information. By default, this field is an empty graph and its evaluation does not produce any output. Evaluating the default training step never update any initializers..onnx.GraphProto algorithm = 2;- Specified by:
getAlgorithmin interfaceOnnxMl.TrainingInfoProtoOrBuilder- Returns:
- The algorithm.
-
getAlgorithmOrBuilder
public OnnxMl.GraphProtoOrBuilder getAlgorithmOrBuilder()
This field represents a training algorithm step. Given required inputs, it computes outputs to update initializers in its own or inference graph's initializer lists. In general, this field contains loss node, gradient node, optimizer node, increment of iteration count. An execution of the training algorithm step is performed by executing the graph obtained by combining the inference graph (namely "ModelProto.graph") and the "algorithm" graph. That is, the actual the actual input/initializer/output/node/value_info/sparse_initializer list of the training graph is the concatenation of "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer" and "algorithm.input/initializer/output/node/value_info/sparse_initializer" in that order. This combined graph must satisfy the normal ONNX conditions. Now, let's provide a visualization of graph combination for clarity. Let the inference graph (i.e., "ModelProto.graph") be tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d and the "algorithm" graph be tensor_d -> Add -> tensor_e The combination process results tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e Notice that an input of a node in the "algorithm" graph may reference the output of a node in the inference graph (but not the other way round). Also, inference node cannot reference inputs of "algorithm". With these restrictions, inference graph can always be run independently without training information. By default, this field is an empty graph and its evaluation does not produce any output. Evaluating the default training step never update any initializers..onnx.GraphProto algorithm = 2;- Specified by:
getAlgorithmOrBuilderin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getInitializationBindingList
public List<OnnxMl.StringStringEntryProto> getInitializationBindingList()
This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto. See "update_binding" below for details. By default, this field is empty and no initializer would be changed by the execution of "initialization".
repeated .onnx.StringStringEntryProto initialization_binding = 3;- Specified by:
getInitializationBindingListin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getInitializationBindingOrBuilderList
public List<? extends OnnxMl.StringStringEntryProtoOrBuilder> getInitializationBindingOrBuilderList()
This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto. See "update_binding" below for details. By default, this field is empty and no initializer would be changed by the execution of "initialization".
repeated .onnx.StringStringEntryProto initialization_binding = 3;- Specified by:
getInitializationBindingOrBuilderListin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getInitializationBindingCount
public int getInitializationBindingCount()
This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto. See "update_binding" below for details. By default, this field is empty and no initializer would be changed by the execution of "initialization".
repeated .onnx.StringStringEntryProto initialization_binding = 3;- Specified by:
getInitializationBindingCountin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getInitializationBinding
public OnnxMl.StringStringEntryProto getInitializationBinding(int index)
This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto. See "update_binding" below for details. By default, this field is empty and no initializer would be changed by the execution of "initialization".
repeated .onnx.StringStringEntryProto initialization_binding = 3;- Specified by:
getInitializationBindingin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getInitializationBindingOrBuilder
public OnnxMl.StringStringEntryProtoOrBuilder getInitializationBindingOrBuilder(int index)
This field specifies the bindings from the outputs of "initialization" to some initializers in "ModelProto.graph.initializer" and the "algorithm.initializer" in the same TrainingInfoProto. See "update_binding" below for details. By default, this field is empty and no initializer would be changed by the execution of "initialization".
repeated .onnx.StringStringEntryProto initialization_binding = 3;- Specified by:
getInitializationBindingOrBuilderin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getUpdateBindingList
public List<OnnxMl.StringStringEntryProto> getUpdateBindingList()
Gradient-based training is usually an iterative procedure. In one gradient descent iteration, we apply x = x - r * g where "x" is the optimized tensor, "r" stands for learning rate, and "g" is gradient of "x" with respect to a chosen loss. To avoid adding assignments into the training graph, we split the update equation into y = x - r * g x = y The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To tell that "y" should be assigned to "x", the field "update_binding" may contain a key-value pair of strings, "x" (key of StringStringEntryProto) and "y" (value of StringStringEntryProto). For a neural network with multiple trainable (mutable) tensors, there can be multiple key-value pairs in "update_binding". The initializers appears as keys in "update_binding" are considered mutable variables. This implies some behaviors as described below. 1. We have only unique keys in all "update_binding"s so that two variables may not have the same name. This ensures that one variable is assigned up to once. 2. The keys must appear in names of "ModelProto.graph.initializer" or "TrainingInfoProto.algorithm.initializer". 3. The values must be output names of "algorithm" or "ModelProto.graph.output". 4. Mutable variables are initialized to the value specified by the corresponding initializer, and then potentially updated by "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s. This field usually contains names of trainable tensors (in ModelProto.graph), optimizer states such as momentums in advanced stochastic gradient methods (in TrainingInfoProto.graph), and number of training iterations (in TrainingInfoProto.graph). By default, this field is empty and no initializer would be changed by the execution of "algorithm".repeated .onnx.StringStringEntryProto update_binding = 4;- Specified by:
getUpdateBindingListin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getUpdateBindingOrBuilderList
public List<? extends OnnxMl.StringStringEntryProtoOrBuilder> getUpdateBindingOrBuilderList()
Gradient-based training is usually an iterative procedure. In one gradient descent iteration, we apply x = x - r * g where "x" is the optimized tensor, "r" stands for learning rate, and "g" is gradient of "x" with respect to a chosen loss. To avoid adding assignments into the training graph, we split the update equation into y = x - r * g x = y The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To tell that "y" should be assigned to "x", the field "update_binding" may contain a key-value pair of strings, "x" (key of StringStringEntryProto) and "y" (value of StringStringEntryProto). For a neural network with multiple trainable (mutable) tensors, there can be multiple key-value pairs in "update_binding". The initializers appears as keys in "update_binding" are considered mutable variables. This implies some behaviors as described below. 1. We have only unique keys in all "update_binding"s so that two variables may not have the same name. This ensures that one variable is assigned up to once. 2. The keys must appear in names of "ModelProto.graph.initializer" or "TrainingInfoProto.algorithm.initializer". 3. The values must be output names of "algorithm" or "ModelProto.graph.output". 4. Mutable variables are initialized to the value specified by the corresponding initializer, and then potentially updated by "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s. This field usually contains names of trainable tensors (in ModelProto.graph), optimizer states such as momentums in advanced stochastic gradient methods (in TrainingInfoProto.graph), and number of training iterations (in TrainingInfoProto.graph). By default, this field is empty and no initializer would be changed by the execution of "algorithm".repeated .onnx.StringStringEntryProto update_binding = 4;- Specified by:
getUpdateBindingOrBuilderListin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getUpdateBindingCount
public int getUpdateBindingCount()
Gradient-based training is usually an iterative procedure. In one gradient descent iteration, we apply x = x - r * g where "x" is the optimized tensor, "r" stands for learning rate, and "g" is gradient of "x" with respect to a chosen loss. To avoid adding assignments into the training graph, we split the update equation into y = x - r * g x = y The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To tell that "y" should be assigned to "x", the field "update_binding" may contain a key-value pair of strings, "x" (key of StringStringEntryProto) and "y" (value of StringStringEntryProto). For a neural network with multiple trainable (mutable) tensors, there can be multiple key-value pairs in "update_binding". The initializers appears as keys in "update_binding" are considered mutable variables. This implies some behaviors as described below. 1. We have only unique keys in all "update_binding"s so that two variables may not have the same name. This ensures that one variable is assigned up to once. 2. The keys must appear in names of "ModelProto.graph.initializer" or "TrainingInfoProto.algorithm.initializer". 3. The values must be output names of "algorithm" or "ModelProto.graph.output". 4. Mutable variables are initialized to the value specified by the corresponding initializer, and then potentially updated by "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s. This field usually contains names of trainable tensors (in ModelProto.graph), optimizer states such as momentums in advanced stochastic gradient methods (in TrainingInfoProto.graph), and number of training iterations (in TrainingInfoProto.graph). By default, this field is empty and no initializer would be changed by the execution of "algorithm".repeated .onnx.StringStringEntryProto update_binding = 4;- Specified by:
getUpdateBindingCountin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getUpdateBinding
public OnnxMl.StringStringEntryProto getUpdateBinding(int index)
Gradient-based training is usually an iterative procedure. In one gradient descent iteration, we apply x = x - r * g where "x" is the optimized tensor, "r" stands for learning rate, and "g" is gradient of "x" with respect to a chosen loss. To avoid adding assignments into the training graph, we split the update equation into y = x - r * g x = y The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To tell that "y" should be assigned to "x", the field "update_binding" may contain a key-value pair of strings, "x" (key of StringStringEntryProto) and "y" (value of StringStringEntryProto). For a neural network with multiple trainable (mutable) tensors, there can be multiple key-value pairs in "update_binding". The initializers appears as keys in "update_binding" are considered mutable variables. This implies some behaviors as described below. 1. We have only unique keys in all "update_binding"s so that two variables may not have the same name. This ensures that one variable is assigned up to once. 2. The keys must appear in names of "ModelProto.graph.initializer" or "TrainingInfoProto.algorithm.initializer". 3. The values must be output names of "algorithm" or "ModelProto.graph.output". 4. Mutable variables are initialized to the value specified by the corresponding initializer, and then potentially updated by "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s. This field usually contains names of trainable tensors (in ModelProto.graph), optimizer states such as momentums in advanced stochastic gradient methods (in TrainingInfoProto.graph), and number of training iterations (in TrainingInfoProto.graph). By default, this field is empty and no initializer would be changed by the execution of "algorithm".repeated .onnx.StringStringEntryProto update_binding = 4;- Specified by:
getUpdateBindingin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
getUpdateBindingOrBuilder
public OnnxMl.StringStringEntryProtoOrBuilder getUpdateBindingOrBuilder(int index)
Gradient-based training is usually an iterative procedure. In one gradient descent iteration, we apply x = x - r * g where "x" is the optimized tensor, "r" stands for learning rate, and "g" is gradient of "x" with respect to a chosen loss. To avoid adding assignments into the training graph, we split the update equation into y = x - r * g x = y The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To tell that "y" should be assigned to "x", the field "update_binding" may contain a key-value pair of strings, "x" (key of StringStringEntryProto) and "y" (value of StringStringEntryProto). For a neural network with multiple trainable (mutable) tensors, there can be multiple key-value pairs in "update_binding". The initializers appears as keys in "update_binding" are considered mutable variables. This implies some behaviors as described below. 1. We have only unique keys in all "update_binding"s so that two variables may not have the same name. This ensures that one variable is assigned up to once. 2. The keys must appear in names of "ModelProto.graph.initializer" or "TrainingInfoProto.algorithm.initializer". 3. The values must be output names of "algorithm" or "ModelProto.graph.output". 4. Mutable variables are initialized to the value specified by the corresponding initializer, and then potentially updated by "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s. This field usually contains names of trainable tensors (in ModelProto.graph), optimizer states such as momentums in advanced stochastic gradient methods (in TrainingInfoProto.graph), and number of training iterations (in TrainingInfoProto.graph). By default, this field is empty and no initializer would be changed by the execution of "algorithm".repeated .onnx.StringStringEntryProto update_binding = 4;- Specified by:
getUpdateBindingOrBuilderin interfaceOnnxMl.TrainingInfoProtoOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfaceorg.nd4j.shade.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfaceorg.nd4j.shade.protobuf.MessageLite- Overrides:
writeToin classorg.nd4j.shade.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfaceorg.nd4j.shade.protobuf.MessageLite- Overrides:
getSerializedSizein classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceorg.nd4j.shade.protobuf.Message- Overrides:
equalsin classorg.nd4j.shade.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceorg.nd4j.shade.protobuf.Message- Overrides:
hashCodein classorg.nd4j.shade.protobuf.AbstractMessage
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
- Throws:
org.nd4j.shade.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(ByteBuffer data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
- Throws:
org.nd4j.shade.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
- Throws:
org.nd4j.shade.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(org.nd4j.shade.protobuf.ByteString data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
- Throws:
org.nd4j.shade.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
- Throws:
org.nd4j.shade.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(byte[] data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
- Throws:
org.nd4j.shade.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static OnnxMl.TrainingInfoProto parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static OnnxMl.TrainingInfoProto parseDelimitedFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static OnnxMl.TrainingInfoProto parseFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public OnnxMl.TrainingInfoProto.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfaceorg.nd4j.shade.protobuf.Message- Specified by:
newBuilderForTypein interfaceorg.nd4j.shade.protobuf.MessageLite
-
newBuilder
public static OnnxMl.TrainingInfoProto.Builder newBuilder()
-
newBuilder
public static OnnxMl.TrainingInfoProto.Builder newBuilder(OnnxMl.TrainingInfoProto prototype)
-
toBuilder
public OnnxMl.TrainingInfoProto.Builder toBuilder()
- Specified by:
toBuilderin interfaceorg.nd4j.shade.protobuf.Message- Specified by:
toBuilderin interfaceorg.nd4j.shade.protobuf.MessageLite
-
newBuilderForType
protected OnnxMl.TrainingInfoProto.Builder newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static OnnxMl.TrainingInfoProto getDefaultInstance()
-
parser
public static org.nd4j.shade.protobuf.Parser<OnnxMl.TrainingInfoProto> parser()
-
getParserForType
public org.nd4j.shade.protobuf.Parser<OnnxMl.TrainingInfoProto> getParserForType()
- Specified by:
getParserForTypein interfaceorg.nd4j.shade.protobuf.Message- Specified by:
getParserForTypein interfaceorg.nd4j.shade.protobuf.MessageLite- Overrides:
getParserForTypein classorg.nd4j.shade.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public OnnxMl.TrainingInfoProto getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfaceorg.nd4j.shade.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceorg.nd4j.shade.protobuf.MessageOrBuilder
-
-