I
- Type of submodels input.O
- Type of aggregator model output.AM
- Type of aggregator model.L
- Type of labels.public class SimpleStackedDatasetTrainer<I,O,AM extends IgniteModel<I,O>,L> extends StackedDatasetTrainer<I,I,O,AM,L>
DatasetTrainer
with same type of input and output of submodels.DatasetTrainer.EmptyDatasetException
envBuilder, environment
Constructor and Description |
---|
SimpleStackedDatasetTrainer()
Constructs instance of this class.
|
SimpleStackedDatasetTrainer(DatasetTrainer<AM,L> aggregatingTrainer,
IgniteBinaryOperator<I> aggregatingInputMerger)
Construct instance of this class.
|
SimpleStackedDatasetTrainer(DatasetTrainer<AM,L> aggregatingTrainer,
IgniteBinaryOperator<I> aggregatingInputMerger,
IgniteFunction<I,I> submodelInput2AggregatingInputConverter,
IgniteFunction<Vector,I> vector2SubmodelInputConverter,
IgniteFunction<I,Vector> submodelOutput2VectorConverter)
Construct instance of this class.
|
Modifier and Type | Method and Description |
---|---|
<M1 extends IgniteModel<I,I>> |
addTrainer(DatasetTrainer<M1,L> trainer)
Adds submodel trainer along with converters needed on training and inference stages.
|
SimpleStackedDatasetTrainer<I,O,AM,L> |
withAggregatorInputMerger(IgniteBinaryOperator<I> merger)
Specify binary operator used to merge submodels outputs to one.
|
SimpleStackedDatasetTrainer<I,O,AM,L> |
withAggregatorTrainer(DatasetTrainer<AM,L> aggregatorTrainer)
Specify aggregator trainer.
|
<L1> SimpleStackedDatasetTrainer<I,O,AM,L1> |
withConvertedLabels(IgniteFunction<L1,L> new2Old)
Creates
DatasetTrainer with same training logic, but able to accept labels of given new type of labels. |
SimpleStackedDatasetTrainer<I,O,AM,L> |
withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
Changes learning Environment.
|
SimpleStackedDatasetTrainer<I,O,AM,L> |
withOriginalFeaturesDropped()
Drop original features during training and inference.
|
SimpleStackedDatasetTrainer<I,O,AM,L> |
withOriginalFeaturesKept()
Keep original features using
IgniteFunction.identity() as submodelInput2AggregatingInputConverter. |
SimpleStackedDatasetTrainer<I,O,AM,L> |
withOriginalFeaturesKept(IgniteFunction<I,I> submodelInput2AggregatingInputConverter)
Keep original features during training and propagate submodels input to aggregator during inference
using given function.
|
fitWithInitializedDeployingContext, isUpdateable, update, updateModel, withSubmodelOutput2VectorConverter, withVector2SubmodelInputConverter
fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update
public SimpleStackedDatasetTrainer(DatasetTrainer<AM,L> aggregatingTrainer, IgniteBinaryOperator<I> aggregatingInputMerger, IgniteFunction<I,I> submodelInput2AggregatingInputConverter, IgniteFunction<Vector,I> vector2SubmodelInputConverter, IgniteFunction<I,Vector> submodelOutput2VectorConverter)
aggregatingTrainer
- Aggregator trainer.aggregatingInputMerger
- Function used to merge submodels outputs into one.submodelInput2AggregatingInputConverter
- Function used to convert input of submodel to output of submodel
this function is used if user chooses to keep original features.public SimpleStackedDatasetTrainer(DatasetTrainer<AM,L> aggregatingTrainer, IgniteBinaryOperator<I> aggregatingInputMerger)
aggregatingTrainer
- Aggregator trainer.aggregatingInputMerger
- Function used to merge submodels outputs into one.public SimpleStackedDatasetTrainer()
public <M1 extends IgniteModel<I,I>> SimpleStackedDatasetTrainer<I,O,AM,L> addTrainer(DatasetTrainer<M1,L> trainer)
addTrainer
in class StackedDatasetTrainer<I,I,O,AM extends IgniteModel<I,O>,L>
trainer
- Submodel trainer.public SimpleStackedDatasetTrainer<I,O,AM,L> withAggregatorTrainer(DatasetTrainer<AM,L> aggregatorTrainer)
withAggregatorTrainer
in class StackedDatasetTrainer<I,I,O,AM extends IgniteModel<I,O>,L>
aggregatorTrainer
- Aggregator trainer.public SimpleStackedDatasetTrainer<I,O,AM,L> withOriginalFeaturesDropped()
withOriginalFeaturesDropped
in class StackedDatasetTrainer<I,I,O,AM extends IgniteModel<I,O>,L>
public SimpleStackedDatasetTrainer<I,O,AM,L> withOriginalFeaturesKept(IgniteFunction<I,I> submodelInput2AggregatingInputConverter)
IS = Vector
), or, more generally,
some IS
parameters which are not reflected just by its type. So converter should be
written accordingly.withOriginalFeaturesKept
in class StackedDatasetTrainer<I,I,O,AM extends IgniteModel<I,O>,L>
submodelInput2AggregatingInputConverter
- Function used to propagate submodels input to aggregator.public SimpleStackedDatasetTrainer<I,O,AM,L> withAggregatorInputMerger(IgniteBinaryOperator<I> merger)
withAggregatorInputMerger
in class StackedDatasetTrainer<I,I,O,AM extends IgniteModel<I,O>,L>
merger
- Binary operator used to merge submodels outputs to one.public SimpleStackedDatasetTrainer<I,O,AM,L> withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
withEnvironmentBuilder
in class StackedDatasetTrainer<I,I,O,AM extends IgniteModel<I,O>,L>
envBuilder
- Learning environment builder.public <L1> SimpleStackedDatasetTrainer<I,O,AM,L1> withConvertedLabels(IgniteFunction<L1,L> new2Old)
DatasetTrainer
with same training logic, but able to accept labels of given new type of labels.withConvertedLabels
in class DatasetTrainer<StackedModel<I,I,O,AM extends IgniteModel<I,O>>,L>
L1
- New labels type.new2Old
- Converter of new labels to old labels.DatasetTrainer
with same training logic, but able to accept labels of given new type of labels.public SimpleStackedDatasetTrainer<I,O,AM,L> withOriginalFeaturesKept()
IgniteFunction.identity()
as submodelInput2AggregatingInputConverter.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024