Training
train
train (cfg:omegaconf.dictconfig.DictConfig, train_dataset:tensorflow.python.data.ops.dataset_ops.DatasetV2, val_dataset:tensorflow.python.data.ops.dataset_ops.DatasetV2, class_weights:dict)
Train the model and returns model and history.
Type | Details | |
---|---|---|
cfg | DictConfig | Hydra Configuration |
train_dataset | DatasetV2 | Train Dataset |
val_dataset | DatasetV2 | Validation Dataset |
class_weights | dict | Class weights dictionary |
Returns | model and history | model and history |
evaluate
evaluate (cfg:omegaconf.dictconfig.DictConfig, model:keras.engine.training.Model, history:dict, test_dataset:tensorflow.python.data.ops.dataset_ops.DatasetV2, labels:list)
Evaluate the trained model on Test Dataset, log confusion matrix and classification report.
Type | Details | |
---|---|---|
cfg | DictConfig | Hydra Configuration. |
model | Model | Tensorflow model. |
history | dict | History object. |
test_dataset | DatasetV2 | Test Dataset. |
labels | list | List of Labels. |
main
main (cfg)
Run Main function.
Type | Details | |
---|---|---|
cfg | DictConfig | Hydra Configuration |
Returns | None |