from tensorflow.contrib.slim.python.slim.data import dataset_data_provider

  def testTFRecordDataset(self):
    dataset_dir = tempfile.mkdtemp(prefix=os.path.join(self.get_temp_dir(),
                                                       'tfrecord_dataset'))

    height = 300
    width = 280

    with self.cached_session():
      test_dataset = _create_tfrecord_dataset(dataset_dir)
      provider = dataset_data_provider.DatasetDataProvider(test_dataset)
      key, image, label = provider.get(['record_key', 'image', 'label'])
      image = _resize_image(image, height, width)

      with session.Session('') as sess:
        with queues.QueueRunners(sess):
          key, image, label = sess.run([key, image, label])
      split_key = key.decode('utf-8').split(':')
      self.assertEqual(2, len(split_key))
