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