ValueError instead of AssertionError for DSS, GMSD, Haarpsi, MS-SSIM, Perceptual, SRSIM, SSIM, VIF
denproc opened this issue · comments
DSS, GMSD, Haarpsi, MS-SSIM, Perceptual, SRSIM, SSIM, VIF metrics and loss function classes use ValueError
exception instead of AssertionError
.
Expected behavior
Check size of the images or features with assert.
Additional context
In context of previous discussion to allow user to turn off validation with python -O
command to boost processing time.
After discussion with @snk4tr and @zakajd, we decided to keep ValueError
exceptions for cases, when a metric computation leads to error (Exception or Invalid values).
For further reference, one should use python -O
command to enable processing of tensors, which are outside of standard metric scope.
Previous discussion in #305: