Currently the networks are taking significant amount of time in the unit tests. It can be improved by remove redundancy and using smaller networks in the tests.
is testing the network forward using a single image or 3 example in the minibatch. These 2 test cases does not test different methods of the network or different conditions, and this do not test any part added in the VQVAE class.
Smaller networks and smaller input images would both help. Unless there's a minimum size for a network we should make images smaller, eg. we don't need 256 sized images necessarily.
Currently the networks are taking significant amount of time in the unit tests. It can be improved by remove redundancy and using smaller networks in the tests.
For example: For the AutoencoderKL https://github.com/Project-MONAI/GenerativeModels/blob/dd08bff0024076186891c1f7518a3210462881ad/tests/test_autoencoderkl.py#L38
and
https://github.com/Project-MONAI/GenerativeModels/blob/dd08bff0024076186891c1f7518a3210462881ad/tests/test_autoencoderkl.py#L23
are building similar networks with same components, having 2 test cases that do not increase coverage.
Other example: For the VQVAE
https://github.com/Project-MONAI/GenerativeModels/blob/dd08bff0024076186891c1f7518a3210462881ad/tests/test_vqvae.py#L25
is testing the network forward using a single image or 3 example in the minibatch. These 2 test cases does not test different methods of the network or different conditions, and this do not test any part added in the VQVAE class.