Implementation of Deep Learning unit tests, as well as paths to the 2d data for windows users in the UNet jupyter notebook.
Unit tests have been implemented for classes and functions that relate to Deep Learning tasks such as defining Models, Hyperparameters, Datasets / Dataloaders, as well as the training process.
The process is documented in the following notion file:
https://www.notion.so/qim-dtu/Unit-tests-to-DL-funtions-e8ad1fc1aa134da2ab26474cc6480ca2
the following scripts have been made under qim3d/tests/
:
- models/test_unet.py (unit tests for
UNet()
andHyperparameters()
) - utils/test_augmentations.py (unit tests for
Augmentations()
and ValueErrors) - utils/test_data.py (unit tests for
Dataset()
class, resizing of images with crop, padding,prepare_datasets()
andprepare_dataloaders()
) - utils/test_models.py (unit tests for output of
model_summary()
andinference()
)
Problem:
- Some deep learning tests require considerably more time to run (around 15s to 20s) especially when a
Dataloader
is involved. This is the case forprepare_dataloaders()
as well as themodel_summary()
. Should they still be included? - I couldn't think of a way to test the
train_model()
function, since that requires training a DL model, and would also take too much time.
Edited by ofhkr