本文整理匯總了Python中object_detection.utils.static_shape.get_batch_size方法的典型用法代碼示例。如果您正苦於以下問題:Python static_shape.get_batch_size方法的具體用法?Python static_shape.get_batch_size怎麽用?Python static_shape.get_batch_size使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類object_detection.utils.static_shape
的用法示例。
在下文中一共展示了static_shape.get_batch_size方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_return_correct_batchSize
# 需要導入模塊: from object_detection.utils import static_shape [as 別名]
# 或者: from object_detection.utils.static_shape import get_batch_size [as 別名]
def test_return_correct_batchSize(self):
tensor_shape = tf.TensorShape(dims=[32, 299, 384, 3])
self.assertEqual(32, static_shape.get_batch_size(tensor_shape))
示例2: test_die_on_tensor_shape_with_rank_three
# 需要導入模塊: from object_detection.utils import static_shape [as 別名]
# 或者: from object_detection.utils.static_shape import get_batch_size [as 別名]
def test_die_on_tensor_shape_with_rank_three(self):
tensor_shape = tf.TensorShape(dims=[32, 299, 384])
with self.assertRaises(ValueError):
static_shape.get_batch_size(tensor_shape)
static_shape.get_height(tensor_shape)
static_shape.get_width(tensor_shape)
static_shape.get_depth(tensor_shape)