from tensorflow.contrib.framework import tensor_util

      either `metrics_collections` or `updates_collections` are not a list or
      tuple.
  """
  predictions, labels = tensor_util.remove_squeezable_dimensions(
      predictions, labels)
  predictions.get_shape().assert_is_compatible_with(labels.get_shape())
