Các mô hình học thần kinh để xếp hạng (LTR) có thể mở rộng, các mô hình học thần kinh để xếp hạng (LTR) có thể mở rộng

import tensorflow as tf
import tensorflow_datasets as tfds
import tensorflow_ranking as tfr

# Prep data
ds = tfds.load("mslr_web/10k_fold1", split="train")
ds = ds.map(lambda feature_map: {
    "_mask": tf.ones_like(feature_map["label"], dtype=tf.bool),
    **feature_map
})
ds = ds.shuffle(buffer_size=1000).padded_batch(batch_size=32)
ds = ds.map(lambda feature_map: (
    feature_map, tf.where(feature_map["_mask"], feature_map.pop("label"), -1.)))

# Create a model
inputs = {
    "float_features": tf.keras.Input(shape=(