# Module: tfrs.layers.loss

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/recommenders/blob/v0.7.7/tensorflow_recommenders/layers/loss.py) |

Layers related to loss computation.

## Classes

[`class HardNegativeMining`](https://www.tensorflow.org/recommenders/api_docs/python/tfrs/layers/loss/HardNegativeMining): Transforms logits and labels to return hard negatives.

[`class RemoveAccidentalHits`](https://www.tensorflow.org/recommenders/api_docs/python/tfrs/layers/loss/RemoveAccidentalHits): Zeroes the logits of accidental negatives.

[`class SamplingProbablityCorrection`](https://www.tensorflow.org/recommenders/api_docs/python/tfrs/layers/loss/SamplingProbablityCorrection): Sampling probability correction.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| MAX_FLOAT | `3.4028234663852885e+36` |
| MIN_FLOAT | `-3.4028234663852885e+36` |

<br />