import tensorflow as tf

        num_classes=3, use_multiclass_scores=True)
    with self.test_session() as sess:
      transformed_inputs = sess.run(
          input_transformation_fn(tensor_dict=tensor_dict))

    self.assertAllClose(
        np.array([[0.2, 0.3, 0.5], [0.1, 0.6, 0.3]], np.float32),
        transformed_inputs[fields.InputDataFields.groundtruth_classes])

  def test_use_multiclass_scores_when_not_present(self):
    image = np.random.rand(4, 4, 3).astype(np.float32)
    tensor_dict = {
        fields.InputDataFields.image:
            tf.constant(image),
        fields.InputDataFields.groundtruth_boxes:
            tf.constant(np.array([[.5, .5, 1, 1], [.5, .5, 1, 1]], np.float32)),
        fields.InputDataFields.multiclass_scores:
            tf.placeholder(tf.float32),
        fields.InputDataFields.groundtruth_classes:
            tf.constant(np.array([1, 2], np.int32))
    }

    input_transformation_fn = functools.partial(
        inputs.transform_input_data,
        model_preprocess_fn=_fake_model_preprocessor_fn,
        image_resizer_fn=_fake_image_resizer_fn,
