public static final class OnnxMl.TrainingInfoProto extends com.google.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 type
onnx.TrainingInfoProto| Modifier and Type | Class and Description |
|---|---|
static class |
OnnxMl.TrainingInfoProto.Builder
Training information
TrainingInfoProto stores information for training a model.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ALGORITHM_FIELD_NUMBER |
static int |
INITIALIZATION_BINDING_FIELD_NUMBER |
static int |
INITIALIZATION_FIELD_NUMBER |
static com.google.protobuf.Parser<OnnxMl.TrainingInfoProto> |
PARSER
Deprecated.
|
static int |
UPDATE_BINDING_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
OnnxMl.GraphProto |
getAlgorithm()
This field represents a training algorithm step.
|
OnnxMl.GraphProtoOrBuilder |
getAlgorithmOrBuilder()
This field represents a training algorithm step.
|
static OnnxMl.TrainingInfoProto |
getDefaultInstance() |
OnnxMl.TrainingInfoProto |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
OnnxMl.GraphProto |
getInitialization()
This field describes a graph to compute the initial tensors
upon starting the training process.
|
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.
|
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.
|
java.util.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.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.
|
java.util.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.GraphProtoOrBuilder |
getInitializationOrBuilder()
This field describes a graph to compute the initial tensors
upon starting the training process.
|
com.google.protobuf.Parser<OnnxMl.TrainingInfoProto> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
OnnxMl.StringStringEntryProto |
getUpdateBinding(int index)
Gradient-based training is usually an iterative procedure.
|
int |
getUpdateBindingCount()
Gradient-based training is usually an iterative procedure.
|
java.util.List<OnnxMl.StringStringEntryProto> |
getUpdateBindingList()
Gradient-based training is usually an iterative procedure.
|
OnnxMl.StringStringEntryProtoOrBuilder |
getUpdateBindingOrBuilder(int index)
Gradient-based training is usually an iterative procedure.
|
java.util.List<? extends OnnxMl.StringStringEntryProtoOrBuilder> |
getUpdateBindingOrBuilderList()
Gradient-based training is usually an iterative procedure.
|
boolean |
hasAlgorithm()
This field represents a training algorithm step.
|
int |
hashCode() |
boolean |
hasInitialization()
This field describes a graph to compute the initial tensors
upon starting the training process.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static OnnxMl.TrainingInfoProto.Builder |
newBuilder() |
static OnnxMl.TrainingInfoProto.Builder |
newBuilder(OnnxMl.TrainingInfoProto prototype) |
OnnxMl.TrainingInfoProto.Builder |
newBuilderForType() |
protected OnnxMl.TrainingInfoProto.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected java.lang.Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static OnnxMl.TrainingInfoProto |
parseDelimitedFrom(java.io.InputStream input) |
static OnnxMl.TrainingInfoProto |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OnnxMl.TrainingInfoProto |
parseFrom(byte[] data) |
static OnnxMl.TrainingInfoProto |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OnnxMl.TrainingInfoProto |
parseFrom(java.nio.ByteBuffer data) |
static OnnxMl.TrainingInfoProto |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OnnxMl.TrainingInfoProto |
parseFrom(com.google.protobuf.ByteString data) |
static OnnxMl.TrainingInfoProto |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OnnxMl.TrainingInfoProto |
parseFrom(com.google.protobuf.CodedInputStream input) |
static OnnxMl.TrainingInfoProto |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static OnnxMl.TrainingInfoProto |
parseFrom(java.io.InputStream input) |
static OnnxMl.TrainingInfoProto |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<OnnxMl.TrainingInfoProto> |
parser() |
OnnxMl.TrainingInfoProto.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int INITIALIZATION_FIELD_NUMBER
public static final int ALGORITHM_FIELD_NUMBER
public static final int INITIALIZATION_BINDING_FIELD_NUMBER
public static final int UPDATE_BINDING_FIELD_NUMBER
@Deprecated public static final com.google.protobuf.Parser<OnnxMl.TrainingInfoProto> PARSER
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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.
optional .onnx.GraphProto initialization = 1;hasInitialization in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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.
optional .onnx.GraphProto initialization = 1;getInitialization in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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.
optional .onnx.GraphProto initialization = 1;getInitializationOrBuilder in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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.
optional .onnx.GraphProto algorithm = 2;hasAlgorithm in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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.
optional .onnx.GraphProto algorithm = 2;getAlgorithm in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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.
optional .onnx.GraphProto algorithm = 2;getAlgorithmOrBuilder in interface OnnxMl.TrainingInfoProtoOrBuilderpublic java.util.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;getInitializationBindingList in interface OnnxMl.TrainingInfoProtoOrBuilderpublic java.util.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;getInitializationBindingOrBuilderList in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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;getInitializationBindingCount in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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;getInitializationBinding in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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;getInitializationBindingOrBuilder in interface OnnxMl.TrainingInfoProtoOrBuilderpublic java.util.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;getUpdateBindingList in interface OnnxMl.TrainingInfoProtoOrBuilderpublic java.util.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;getUpdateBindingOrBuilderList in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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;getUpdateBindingCount in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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;getUpdateBinding in interface OnnxMl.TrainingInfoProtoOrBuilderpublic 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;getUpdateBindingOrBuilder in interface OnnxMl.TrainingInfoProtoOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static OnnxMl.TrainingInfoProto parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static OnnxMl.TrainingInfoProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static OnnxMl.TrainingInfoProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static OnnxMl.TrainingInfoProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic OnnxMl.TrainingInfoProto.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static OnnxMl.TrainingInfoProto.Builder newBuilder()
public static OnnxMl.TrainingInfoProto.Builder newBuilder(OnnxMl.TrainingInfoProto prototype)
public OnnxMl.TrainingInfoProto.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected OnnxMl.TrainingInfoProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static OnnxMl.TrainingInfoProto getDefaultInstance()
public static com.google.protobuf.Parser<OnnxMl.TrainingInfoProto> parser()
public com.google.protobuf.Parser<OnnxMl.TrainingInfoProto> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public OnnxMl.TrainingInfoProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder