本文整理汇总了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])