swift-apis icon indicating copy to clipboard operation
swift-apis copied to clipboard

Should we convert binary (0, 1) labels to -1 or 1 within categoricalHingeLoss?

Open BradLarson opened this issue 4 years ago • 0 comments

As pointed out in PR #579, the tf.keras implementation of categorical_hinge() expects values to be -1 or 1, but will convert binary labels of 0 or 1 to -1 and 1. Within our implementation of categoricalHingeLoss() we do not perform this automatic conversion.

Should we? Are there any possible negative consequences for doing so, or would this lead to confusion?

BradLarson avatar Feb 05 '20 16:02 BradLarson