We have currently/intentionally not added input validation and exception raising to loss functions to prevent potential performance loss. It could be beneficial to explore mechanisms (e.g. potentially via python decorators) for adding this.
Validations suggestions:
- test_raises_error_when_any_y_true_and_y_pred_lengths_different
- For losses that expect a probability input (between 0 and 1).
- test_raises_error_when_y_true_not_sum_1
- test_raises_error_when_y_pred_not_sum_1
- test_raises_error_when_any_y_pred_le_0
- test_raises_error_when_any_y_pred_gt_1
We have currently/intentionally not added input validation and exception raising to loss functions to prevent potential performance loss. It could be beneficial to explore mechanisms (e.g. potentially via python decorators) for adding this.
Validations suggestions: