tfr.keras.losses.LabelDiffLambdaWeight

Keras serializable class for LabelDiffLambdaWeight.

Methods

get_config

View source

individual_weights

View source

Returns the weight Tensor for individual examples.

Args
labels A dense Tensor of labels with shape [batch_size, list_size].
ranks A dense Tensor of ranks with the same shape as labels that are sorted by logits.

Returns
A Tensor that can weight individual examples.

pair_weights

View source

Returns the absolute label difference for each pair.