View source on GitHub |
A class to load dataset for ranking task.
tfr.extension.task.RankingDataLoader(
params,
context_feature_spec: tfr.extension.task.FeatureSpec
= None,
example_feature_spec: tfr.extension.task.FeatureSpec
= None,
label_spec: Tuple[str, tf.io.FixedLenFeature] = None,
dataset_fn: Optional[Callable[[], tf.data.Dataset]] = None
)
Methods
load
load(
input_context: Optional[tf.distribute.InputContext] = None
) -> tf.data.Dataset
Returns a tf.dataset.Dataset.