def preprocess_train_input(features, labels):
    'Pre-process the training data.\n\n        This is needed because\n        - The label needs to be extended to be used in the loss fn\n        - We need the same inputs for training and eval so adding fake inputs\n          for DUPLICATE_MASK in training data.\n\n        Args:\n          features: Dictionary of features for training.\n          labels: Training labels.\n\n        Returns:\n          Processed training features.\n        '
    fake_dup_mask = tf.zeros_like(features[movielens.USER_COLUMN])
    features[rconst.DUPLICATE_MASK] = fake_dup_mask
    features[rconst.TRAIN_LABEL_KEY] = labels
    return features
Pre-process the training data.

This is needed because
- The label needs to be extended to be used in the loss fn
- We need the same inputs for training and eval so adding fake inputs
  for DUPLICATE_MASK in training data.

Args:
  features: Dictionary of features for training.
  labels: Training labels.

Returns:
  Processed training features.
def preprocess_train_input(features, labels):
    'Pre-process the training data.\n\n        This is needed because\n        - The label needs to be extended to be used in the loss fn\n        - We need the same inputs for training and eval so adding fake inputs\n          for DUPLICATE_MASK in training data.\n\n        Args:\n          features: Dictionary of features for training.\n          labels: Training labels.\n\n        Returns:\n          Processed training features.\n        '
    fake_dup_mask = tf.zeros_like(features[movielens.USER_COLUMN])
    features[rconst.DUPLICATE_MASK] = fake_dup_mask
    features[rconst.TRAIN_LABEL_KEY] = labels
    return features