# Module: tfr.keras.model

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/ranking/blob/v0.5.3/tensorflow_ranking/python/keras/model.py) |

Ranking model utilities and classes in tfr.keras.

## Classes

[`class AbstractModelBuilder`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/AbstractModelBuilder): Interface to build a [`tf.keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model) for ranking.

[`class DNNScorer`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/DNNScorer): Univariate scorer using DNN.

[`class FeatureSpecInputCreator`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/FeatureSpecInputCreator): InputCreator with feature specs.

[`class GAMScorer`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/GAMScorer): Univariate scorer using GAM.

[`class InputCreator`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/InputCreator): Interface for input creator.

[`class ModelBuilder`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/ModelBuilder): Builds a [`tf.keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model).

[`class ModelBuilderWithMask`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/ModelBuilderWithMask): Interface to build a [`tf.keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model) for ranking with a mask Tensor.

[`class Preprocessor`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/Preprocessor): Interface for feature preprocessing.

[`class PreprocessorWithSpec`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/PreprocessorWithSpec): Preprocessing inputs with provided spec.

[`class Scorer`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/Scorer): Interface for scorer.

[`class TypeSpecInputCreator`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/TypeSpecInputCreator): InputCreator with tensor type specs.

[`class UnivariateScorer`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/UnivariateScorer): Interface for univariate scorer.

## Functions

[`create_keras_model(...)`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/create_keras_model): Creates a Functional Keras ranking model.

## Type Aliases

[`TensorDict`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/TensorDict)

[`TensorLike`](https://www.tensorflow.org/ranking/api_docs/python/tfr/keras/model/TensorLike)