loss_cl: Contrastive loss

View source: R/metrics.R

loss_clR Documentation

Contrastive loss

Description

Contrastive loss as used here: https://keras.io/examples/vision/siamese_contrastive/.

Usage

loss_cl(margin = 1)

Arguments

margin

Integer, baseline for distance for which pairs should be classified as dissimilar.

Value

A function implementing contrastive loss.

Examples


cl <- loss_cl(margin=1)


GenomeNet/deepG documentation built on Dec. 24, 2024, 12:11 p.m.