Computes the lifted structured loss.

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

Value

lifted_loss: tf$float32 scalar.

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