class_docstr: Base class for ranking networks in Keras.
class_docstr_tok: ["Base","class","for","ranking","networks","in","Keras","."]
docstr: Transforms the features into dense context features and example features.
  
  The user can overwrite this function for custom transformations.
  Mask is provided as an argument so that inherited models can have access
  to it for custom feature transformations, without modifying
  `call` explicitly.
  
  Args:
    features: (dict) with a mix of context (2D) and example features (3D).
    training: (bool) whether in train or inference mode.
    mask: (tf.Tensor) Mask is a tensor of shape [batch_size, list_size], which
      is True for a valid example and False for invalid one.
  
  Returns:
    context_features: (dict) context feature names to dense 2D tensors of
      shape [batch_size, feature_dims].
    example_features: (dict) example feature names to dense 3D tensors of
      shape [batch_size, list_size, feature_dims].
docstr_tok: ["Transforms","the","features","into","dense","context","features","and","example","features",".","The","user","can","overwrite","this","function","for","custom","transformations",".","Mask","is","provided","as","an","argument","so","that","inherited","models","can","have","access","to","it","for","custom","feature","transformations",",","without","modifying","`","call","`","explicitly",".","Args",":","features",":","(","dict",")","with","a","mix","of","context","(","2D",")","and","example","features","(","3D",")",".","training",":","(","bool",")","whether","in","train","or","inference","mode",".","mask",":","(","tf.Tensor",")","Mask","is","a","tensor","of","shape","[","batch_size",",","list_size","]",",","which","is","True","for","a","valid","example","and","False","for","invalid","one",".","Returns",":","context_features",":","(","dict",")","context","feature","names","to","dense","2D","tensors","of","shape","[","batch_size",",","feature_dims","]",".","example_features",":","(","dict",")","example","feature","names","to","dense","3D","tensors","of","shape","[","batch_size",",","list_size",",","feature_dims","]","."]
code: def transform(self, features=None, training=None, mask=None):
      """Transforms the features into dense context features and example features.
  
      The user can overwrite this function for custom transformations.
      Mask is provided as an argument so that inherited models can have access
      to it for custom feature transformations, without modifying
      `call` explicitly.
  
      Args:
        features: (dict) with a mix of context (2D) and example features (3D).
        training: (bool) whether in train or inference mode.
        mask: (tf.Tensor) Mask is a tensor of shape [batch_size, list_size], which
          is True for a valid example and False for invalid one.
  
      Returns:
        context_features: (dict) context feature names to dense 2D tensors of
          shape [batch_size, feature_dims].
        example_features: (dict) example feature names to dense 3D tensors of
          shape [batch_size, list_size, feature_dims].
      """
      del mask
      context_features, example_features = self._listwise_dense_layer(
          inputs=features, training=training
      )
      return context_features, example_features
  
imports: import abc
  import six
  import tensorflow.compat.v2
  from tensorflow_ranking.python import utils
  from tensorflow_ranking.python.keras import feature
label_desc: Use image node_id 4 for calling the RankingNetwork obj's underlying member method code with example usage: obj.transform(features, training, mask) and returns: context_features,  example_features