class_docstr: Interface for a ranking model.
class_docstr_tok: ["Interface","for","a","ranking","model","."]
docstr: Constructor for the common components of all ranking models.
  
  Args:
    transform_fn: (function) A user-provided function that transforms raw
      features into dense Tensors with the following signature:
      * Args:
        `features`: A dict of Tensors or SparseTensors that contains the raw
          features from an input_fn.
        `mode`: Optional. See estimator `ModeKeys`.
        `params`: Optional. See tf.estimator model_fn. Hyperparameters for the
          model.
      * Returns:
        `context_features`: A dict of `Tensor`s with shape [batch_size, ...]
        `example_features`: A dict of `Tensor`s with shape [batch_size,
          list_size, ...]
docstr_tok: ["Constructor","for","the","common","components","of","all","ranking","models",".","Args",":","transform_fn",":","(","function",")","A","user-provided","function","that","transforms","raw","features","into","dense","Tensors","with","the","following","signature",":","*","Args",":","`","features","`",":","A","dict","of","Tensors","or","SparseTensors","that","contains","the","raw","features","from","an","input_fn",".","`","mode","`",":","Optional",".","See","estimator","`","ModeKeys","`",".","`","params","`",":","Optional",".","See","tf.estimator","model_fn",".","Hyperparameters","for","the","model",".","*","Returns",":","`","context_features","`",":","A","dict","of","`","Tensor","`","s","with","shape","[","batch_size",",","...","]","`","example_features","`",":","A","dict","of","`","Tensor","`","s","with","shape","[","batch_size",",","list_size",",","...","]"]
code: def __init__(self, transform_fn=None):
      """Constructor for the common components of all ranking models.
  
      Args:
        transform_fn: (function) A user-provided function that transforms raw
          features into dense Tensors with the following signature:
          * Args:
            `features`: A dict of Tensors or SparseTensors that contains the raw
              features from an input_fn.
            `mode`: Optional. See estimator `ModeKeys`.
            `params`: Optional. See tf.estimator model_fn. Hyperparameters for the
              model.
          * Returns:
            `context_features`: A dict of `Tensor`s with shape [batch_size, ...]
            `example_features`: A dict of `Tensor`s with shape [batch_size,
              list_size, ...]
      """
      if transform_fn is None:
          self._transform_fn = feature.make_identity_transform_fn({})
      else:
          self._transform_fn = transform_fn
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  import tensorflow
  from tensorflow import estimator
  from tensorflow.python.util import function_utils
  from tensorflow_ranking.python import feature
  from tensorflow_ranking.python import utils
label_desc: Use image node_id 1 to create a new _RankingModel object from inherited base classes: object with example: obj = _RankingModel(transform_fn)