swift-apis
swift-apis copied to clipboard
Should we convert binary (0, 1) labels to -1 or 1 within categoricalHingeLoss?
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?