Ensemble Mixin#
Module for the ensemble mixin class.
- class EnsembleMixin[source]
Bases:
MultiModelMixinMixin that defines the forward pass and optimizer configuration for solvers backed by an ensemble of models. Provides properties to access the models, optimizers, and schedulers.
Designed to be used in combination with any solver inheriting from
BaseSolver.- forward(x)[source]
Forward pass for ensemble solvers. If an active model index is set, only that model is evaluated. Otherwise, all models are evaluated and their outputs are stacked together.
- Parameters:
x (torch.Tensor | LabelTensor | Data | Graph) – The input data.
- Returns:
The output of all models stacked together.
- Return type:
torch.Tensor | LabelTensor | Data | Graph