tfr.keras.model.create_keras_model
Creates a Functional Keras ranking model.
tfr.keras.model.create_keras_model(
network, loss, metrics, optimizer, size_feature_name, list_size=None
)
A mask is inferred from size_feature_name and passed to the network, along
with feature dictionary as inputs.
Args |
network
|
(tfr.keras.network.RankingNetwork ) A ranking network which
generates a list of scores.
|
loss
|
(tfr.keras.losses._RankingLoss ) A ranking loss.
|
metrics
|
(list) List of ranking metrics, tfr.keras.metrics._RankingMetric
instances.
|
optimizer
|
(tf.keras.optimizer.Optimizer ) Optimizer to minimize ranking
loss.
|
size_feature_name
|
(str) Name of feature for example list sizes. If not
None, this feature name corresponds to a tf.int32 Tensor of size
[batch_size] corresponding to sizes of example lists. If None , all
examples are treated as valid.
|
list_size
|
(int) The list size for example features. If None, use dynamic
list size. A fixed list size is required for TPU training.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-08-18 UTC.
[null,null,["Last updated 2023-08-18 UTC."],[],[]]