deepblink.training module¶
Training functions.
-
deepblink.training.
run_experiment
(cfg: Dict[KT, VT], pre_model: keras.engine.training.Model = None)[source]¶ Run a training experiment.
Configuration file can be generated using deepblink config.
Parameters: - cfg – Dictionary configuration file.
- pre_model – Pre-trained model if not training from scratch.
-
deepblink.training.
train_model
(model: deepblink.models._models.Model, dataset: deepblink.datasets._datasets.Dataset, cfg: Dict[KT, VT], run_name: str = 'model', use_wandb: bool = True) → deepblink.models._models.Model[source]¶ Model training loop with callbacks.
Parameters: - model – Model class with the .fit method.
- dataset – Dataset class with access to train and validation images.
- cfg – Configuration file equivalent to the one used in pink.training.run_experiment.
- run_name – Name given to the model.h5 file saved.
- use_wandb – If Wandb should be used.