本文整理汇总了Python中inception.slim.ops.dropout方法的典型用法代码示例。如果您正苦于以下问题:Python ops.dropout方法的具体用法?Python ops.dropout怎么用?Python ops.dropout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类inception.slim.ops
的用法示例。
在下文中一共展示了ops.dropout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testCreateDropout
# 需要导入模块: from inception.slim import ops [as 别名]
# 或者: from inception.slim.ops import dropout [as 别名]
def testCreateDropout(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.dropout(images)
self.assertEquals(output.op.name, 'Dropout/dropout/mul')
output.get_shape().assert_is_compatible_with(images.get_shape())
示例2: testCreateDropoutNoTraining
# 需要导入模块: from inception.slim import ops [as 别名]
# 或者: from inception.slim.ops import dropout [as 别名]
def testCreateDropoutNoTraining(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1, name='images')
output = ops.dropout(images, is_training=False)
self.assertEquals(output, images)
示例3: testCreateDropout
# 需要导入模块: from inception.slim import ops [as 别名]
# 或者: from inception.slim.ops import dropout [as 别名]
def testCreateDropout(self):
height, width = 3, 3
with self.test_session():
images = tf.random_uniform((5, height, width, 3), seed=1)
output = ops.dropout(images)
self.assertEquals(output.op.name, 'Dropout/dropout/mul_1')
output.get_shape().assert_is_compatible_with(images.get_shape())