loss_lifted_struct: Lifted structured loss

Description Usage Arguments Details Value

View source: R/losses.R

Description

Computes the lifted structured loss.

Usage

1
loss_lifted_struct(margin = 1, name = NULL, ...)

Arguments

margin

Float, margin term in the loss definition.

name

Optional name for the op.

...

additional parameters to pass

Details

The loss encourages the positive distances (between a pair of embeddings with the same labels) to be smaller than any negative distances (between a pair of embeddings with different labels) in the mini-batch in a way that is differentiable with respect to the embedding vectors. See: https://arxiv.org/abs/1511.06452

Value

lifted_loss: tf$float32 scalar.


tfaddons documentation built on July 2, 2020, 2:12 a.m.