API Reference: Training¶
- class masterful.training.TrainingReport(validation_results=None, gpu_info=None, history=None, model=None)¶
Structure which holds the results of a training run.
validation_results (Dict[str, float]) – The final results from evaluating the model on the validation set.
gpu_info (Sequence[masterful.utils.gpu.GpuInfo]) – A list of GpuInfo objects, with relevant gpu usage information.
history (keras.callbacks.History) – The full training history report, containing the results at the end of each epoch for key metrics.
model (Optional[keras.engine.training.Model]) – A reference to the trained model. This will be different than the model passed in for training if model_ensemble is greater than 1.
- Return type
- masterful.training.train(*args, **kwargs)¶
Trains a model using the Masterful platform.
The model passed into this function will be trained against the passed in datasets using the given parameters for regularization, optimization, and semi-supervised learning.
model – The model to train.
model_params – Parameters of the model to train.
optimizer_params – Parameters to use for optimization. These can be created directly, or found automatically using
regularization_params – Parameters to use for regularization. These can be created directly, or found automatically using
ssl_params – Parameters to use for semi-supervised training. These can be created directly, or learned automatically using
training_dataset – The labeled dataset to use during training.
training_dataset_params – The parameters of the labeled dataset.
validation_dataset – An optional validation dataset to use during training. If no validation set is specified, Masterful will autmoatically create one from the labeled dataset.
validation_dataset_params – Optional parameters of the validation dataset.
unlabeled_datasets – Optional sequence of unlabled datasets and their parameters, to use during training. If an unlabeled dataset is specified, then a set of algorithms must be specified in ssl_params otherwise this will have no effect.
synthetic_datasets – Optional sequence of synthetic data and parameters to use during training. The amount of synthetic data used during training is controlled by
An instance of
TrainingReportwith the full results of training the model with the given parameters.