import tensorflow as tf

    # Transform the input features
    for key, input_modality in six.iteritems(
        self._problem_hparams.input_modality):
      if key not in features:
        tf.logging.warning("Missing feature %s - ignoring." % key)
        continue
      do_reuse = input_modality.name in all_previous_modalities
      with tf.variable_scope(input_modality.name, reuse=do_reuse):
        log_info("Transforming feature '%s' with %s.bottom", key,
                 input_modality.name)
        transformed_features[key] = input_modality.bottom(features[key])
      all_previous_modalities.append(input_modality.name)

    # Transform the targets (for autoregressive models)
