本文整理匯總了Python中tensorflow.contrib.slim.queues.QueueRunners方法的典型用法代碼示例。如果您正苦於以下問題:Python queues.QueueRunners方法的具體用法?Python queues.QueueRunners怎麽用?Python queues.QueueRunners使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tensorflow.contrib.slim.queues
的用法示例。
在下文中一共展示了queues.QueueRunners方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_provided_data_has_correct_shape
# 需要導入模塊: from tensorflow.contrib.slim import queues [as 別名]
# 或者: from tensorflow.contrib.slim.queues import QueueRunners [as 別名]
def test_provided_data_has_correct_shape(self):
batch_size = 4
data = data_provider.get_data(
dataset=datasets.fsns_test.get_test_split(),
batch_size=batch_size,
augment=True,
central_crop_size=None)
with self.test_session() as sess, queues.QueueRunners(sess):
images_np, labels_np = sess.run([data.images, data.labels_one_hot])
self.assertEqual(images_np.shape, (batch_size, 150, 600, 3))
self.assertEqual(labels_np.shape, (batch_size, 37, 134))
示例2: test_optionally_applies_central_crop
# 需要導入模塊: from tensorflow.contrib.slim import queues [as 別名]
# 或者: from tensorflow.contrib.slim.queues import QueueRunners [as 別名]
def test_optionally_applies_central_crop(self):
batch_size = 4
data = data_provider.get_data(
dataset=datasets.fsns_test.get_test_split(),
batch_size=batch_size,
augment=True,
central_crop_size=(500, 100))
with self.test_session() as sess, queues.QueueRunners(sess):
images_np = sess.run(data.images)
self.assertEqual(images_np.shape, (batch_size, 100, 500, 3))