TensorFlow Ranking v0.3.3
This is the 0.3.3 release of TensorFlow Ranking. It depends on tf-models-official >= 2.4.0
and tensorflow-serving-api>= 2.0.0, < 3.0.0
. It is compatible with tensorflow==2.4.1
. All of these packages will be installed as required packages when installing tensorflow-ranking
.
The main changes in this release contain the Document Interaction Network (DIN) layer and layers for training Keras models using Functional API. The new components are listed below:
-
Document Interaction Network: See paper.
- Building Keras ranking models for DIN using Keras Preprocessing Layers.
tfr.keras.layers.DocumentInteractionAttention
: A keras layer to model cross-document interactions. Applies cross-document attention across valid examples identified using a mask.
-
Keras Layers: for easy transformation of context and example features and related utilities.
tfr.keras.layers.FlattenList
: Flattens thebatch_size
dimension and thelist_size
dimension for theexample_features
and expandslist_size
times for thecontext_features
.tfr.keras.layers.ConcatFeatures
: Concatenates context features and example features in a listwise manner.tfr.keras.layers.RestoreList
: Output layer to restorebatch_size
dimension andlist_size
dimension for the output shape of logits.
-
Others
tfr.keras.metrics.get(metric_key)
: Add aget
metric factory for keras metrics.- Masking support in tfr.data: Add support for parsing a boolean
mask
tensor which indicates number of valid examples viamask_feature_name
argument intfr.data._RankingDataParser
and all associated input data parsing andserving_input_fn
builders.