本文整理匯總了Python中models.default_batch_norm_params方法的典型用法代碼示例。如果您正苦於以下問題:Python models.default_batch_norm_params方法的具體用法?Python models.default_batch_norm_params怎麽用?Python models.default_batch_norm_params使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類models
的用法示例。
在下文中一共展示了models.default_batch_norm_params方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testBuildPoseModelWithBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testBuildPoseModelWithBatchNorm(self):
images = tf.to_float(np.random.rand(10, 64, 64, 4))
with self.test_session() as sess:
logits, _ = getattr(models, 'dsn_cropped_linemod')(
images, batch_norm_params=models.default_batch_norm_params(True))
sess.run(tf.global_variables_initializer())
logits_np = sess.run(logits)
self.assertEqual(logits_np.shape, (10, 11))
self.assertTrue(np.any(logits_np))
示例2: testEncoderIsTrainingBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testEncoderIsTrainingBatchNorm(self):
self._testEncoder(models.default_batch_norm_params(True))
示例3: testEncoderBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testEncoderBatchNorm(self):
self._testEncoder(models.default_batch_norm_params(False))
示例4: testSmallDecoderBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testSmallDecoderBatchNorm(self):
self._testDecoder(28, 28, 4, models.default_batch_norm_params(False))
示例5: testSmallDecoderIsTrainingBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testSmallDecoderIsTrainingBatchNorm(self):
self._testDecoder(28, 28, 4, models.default_batch_norm_params(True))
示例6: testLargeDecoderIsTrainingBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testLargeDecoderIsTrainingBatchNorm(self):
self._testDecoder(32, 32, 4,
models.default_batch_norm_params(True),
getattr(models, 'large_decoder'))
示例7: testGtsrbDecoderBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testGtsrbDecoderBatchNorm(self):
self._testDecoder(40, 40, 4,
models.default_batch_norm_params(False),
getattr(models, 'gtsrb_decoder'))
示例8: testGtsrbDecoderIsTrainingBatchNorm
# 需要導入模塊: import models [as 別名]
# 或者: from models import default_batch_norm_params [as 別名]
def testGtsrbDecoderIsTrainingBatchNorm(self):
self._testDecoder(40, 40, 4,
models.default_batch_norm_params(True),
getattr(models, 'gtsrb_decoder'))