residualffn_models#
Source code: sensai/torch/torch_models/residualffn/residualffn_models.py
- class ResidualFeedForwardNetworkTorchModel(cuda: bool, hidden_dims: Sequence[int], bottleneck_dimension_factor: float = 1, p_dropout=None, use_batch_normalisation: bool = False)[source]#
Bases:
VectorTorchModel
- create_torch_module_for_dims(input_dim: int, output_dim: int) torch.nn.Module [source]#
- Parameters:
input_dim – the number of input dimensions as reported by the data set provider (number of columns in input data frame for default providers)
output_dim – the number of output dimensions as reported by the data set provider (for default providers, this will be the number of columns in the output data frame or, for classification, the number of classes)
- Returns:
the torch module
- cuda: bool#
- module: Optional[torch.nn.Module]#
- outputScaler: Optional[TensorScaler]#
- inputScaler: Optional[TensorScaler]#
- trainingInfo: Optional[TrainingInfo]#
- class ResidualFeedForwardNetworkVectorRegressionModel(hidden_dims: Sequence[int], bottleneck_dimension_factor: float = 1, cuda: bool = True, p_dropout: Optional[float] = None, use_batch_normalisation: bool = False, normalisation_mode: NormalisationMode = NormalisationMode.NONE, nn_optimiser_params: Optional[Union[NNOptimiserParams, dict]] = None)[source]#
Bases:
TorchVectorRegressionModel
- Parameters:
torch_model_factory – the factory function with which to create the contained TorchModel instance that the instance is to encapsulate. For the instance to be picklable, this cannot be a lambda or locally defined function.
normalisation_mode – the normalisation mode to apply to input data frames
nn_optimiser_params – the parameters to apply in NNOptimiser during training