本文整理匯總了Python中inception.slim.ops.max_pool方法的典型用法代碼示例。如果您正苦於以下問題:Python ops.max_pool方法的具體用法?Python ops.max_pool怎麽用?Python ops.max_pool使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類inception.slim.ops
的用法示例。
在下文中一共展示了ops.max_pool方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testCreateMaxPool
# 需要導入模塊: from inception.slim import ops [as 別名]
# 或者: from inception.slim.ops import max_pool [as 別名]
def testCreateMaxPool(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.max_pool(images, [3, 3])
self.assertEquals(output.op.name, 'MaxPool/MaxPool')
self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])
示例2: testCreateSquareMaxPool
# 需要導入模塊: from inception.slim import ops [as 別名]
# 或者: from inception.slim.ops import max_pool [as 別名]
def testCreateSquareMaxPool(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.max_pool(images, 3)
self.assertEquals(output.op.name, 'MaxPool/MaxPool')
self.assertListEqual(output.get_shape().as_list(), [5, 1, 1, 3])
示例3: testCreateMaxPoolWithScope
# 需要導入模塊: from inception.slim import ops [as 別名]
# 或者: from inception.slim.ops import max_pool [as 別名]
def testCreateMaxPoolWithScope(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.max_pool(images, [3, 3], scope='pool1')
self.assertEquals(output.op.name, 'pool1/MaxPool')
示例4: testCreateMaxPoolSAME
# 需要導入模塊: from inception.slim import ops [as 別名]
# 或者: from inception.slim.ops import max_pool [as 別名]
def testCreateMaxPoolSAME(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.max_pool(images, [3, 3], padding='SAME')
self.assertListEqual(output.get_shape().as_list(), [5, 2, 2, 3])
示例5: testCreateMaxPoolStrideSAME
# 需要導入模塊: from inception.slim import ops [as 別名]
# 或者: from inception.slim.ops import max_pool [as 別名]
def testCreateMaxPoolStrideSAME(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.max_pool(images, [3, 3], stride=1, padding='SAME')
self.assertListEqual(output.get_shape().as_list(), [5, height, width, 3])