Esempio n. 1
0
  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))
Esempio n. 2
0
    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))
Esempio n. 3
0
 def testGtsrbDecoderIsTrainingBatchNorm(self):
   self._testDecoder(40, 40, 4,
                     models.default_batch_norm_params(True),
                     getattr(models, 'gtsrb_decoder'))
Esempio n. 4
0
 def testGtsrbDecoderBatchNorm(self):
   self._testDecoder(40, 40, 4,
                     models.default_batch_norm_params(False),
                     getattr(models, 'gtsrb_decoder'))
Esempio n. 5
0
 def testLargeDecoderIsTrainingBatchNorm(self):
   self._testDecoder(32, 32, 4,
                     models.default_batch_norm_params(True),
                     getattr(models, 'large_decoder'))
Esempio n. 6
0
 def testLargeDecoderBatchNorm(self):
   self._testDecoder(32, 32, 4,
                     models.default_batch_norm_params(False),
                     getattr(models, 'large_decoder'))
Esempio n. 7
0
 def testSmallDecoderIsTrainingBatchNorm(self):
   self._testDecoder(28, 28, 4, models.default_batch_norm_params(True))
Esempio n. 8
0
 def testSmallDecoderIsTrainingBatchNorm(self):
     self._testDecoder(28, 28, 4, models.default_batch_norm_params(True))
Esempio n. 9
0
 def testEncoderBatchNorm(self):
     self._testEncoder(models.default_batch_norm_params(False))
Esempio n. 10
0
 def testEncoderIsTrainingBatchNorm(self):
     self._testEncoder(models.default_batch_norm_params(True))
Esempio n. 11
0
 def testGtsrbDecoderIsTrainingBatchNorm(self):
     self._testDecoder(40, 40, 4, models.default_batch_norm_params(True),
                       getattr(models, 'gtsrb_decoder'))
Esempio n. 12
0
 def testGtsrbDecoderBatchNorm(self):
     self._testDecoder(40, 40, 4, models.default_batch_norm_params(False),
                       getattr(models, 'gtsrb_decoder'))
Esempio n. 13
0
 def testLargeDecoderIsTrainingBatchNorm(self):
     self._testDecoder(32, 32, 4, models.default_batch_norm_params(True),
                       getattr(models, 'large_decoder'))
Esempio n. 14
0
 def testLargeDecoderBatchNorm(self):
     self._testDecoder(32, 32, 4, models.default_batch_norm_params(False),
                       getattr(models, 'large_decoder'))
Esempio n. 15
0
 def testEncoderIsTrainingBatchNorm(self):
   self._testEncoder(models.default_batch_norm_params(True))
Esempio n. 16
0
 def testSmallDecoderBatchNorm(self):
   self._testDecoder(28, 28, 4, models.default_batch_norm_params(False))
Esempio n. 17
0
 def testEncoderBatchNorm(self):
   self._testEncoder(models.default_batch_norm_params(False))
Esempio n. 18
0
 def testSmallDecoderBatchNorm(self):
     self._testDecoder(28, 28, 4, models.default_batch_norm_params(False))