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))
def testGtsrbDecoderIsTrainingBatchNorm(self): self._testDecoder(40, 40, 4, models.default_batch_norm_params(True), getattr(models, 'gtsrb_decoder'))
def testGtsrbDecoderBatchNorm(self): self._testDecoder(40, 40, 4, models.default_batch_norm_params(False), getattr(models, 'gtsrb_decoder'))
def testLargeDecoderIsTrainingBatchNorm(self): self._testDecoder(32, 32, 4, models.default_batch_norm_params(True), getattr(models, 'large_decoder'))
def testLargeDecoderBatchNorm(self): self._testDecoder(32, 32, 4, models.default_batch_norm_params(False), getattr(models, 'large_decoder'))
def testSmallDecoderIsTrainingBatchNorm(self): self._testDecoder(28, 28, 4, models.default_batch_norm_params(True))
def testEncoderBatchNorm(self): self._testEncoder(models.default_batch_norm_params(False))
def testEncoderIsTrainingBatchNorm(self): self._testEncoder(models.default_batch_norm_params(True))
def testSmallDecoderBatchNorm(self): self._testDecoder(28, 28, 4, models.default_batch_norm_params(False))