本文整理匯總了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())