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
Merge request reports
Activity
requested review from @fima
assigned to @s184364
added 1 commit
- 41be9bdb - Implementation of temporary dataset for unit testing of Deep learning tools.
added 1 commit
- abefb043 - Resolved problem where unit tests for inference/train_model didn't work on GPU
added 15 commits
-
8844f5c7...fe74b961 - 14 commits from branch
main
- f22eb7bf - Merge branch 'main' into 'DL_unittests'
-
8844f5c7...fe74b961 - 14 commits from branch
mentioned in commit 784049a6
Please register or sign in to reply