R/metrics.R
loss_cl.Rd
Contrastive loss as used here: https://keras.io/examples/vision/siamese_contrastive/.
loss_cl(margin = 1)
Integer, baseline for distance for which pairs should be classified as dissimilar.
A function implementing contrastive loss.
if (FALSE) { # reticulate::py_module_available("tensorflow") cl <- loss_cl(margin=1) }