Exemple #1
0
 def testWithOutputStride8(self):
     out, _ = mobilenet.mobilenet_base(tf.placeholder(
         tf.float32, (10, 224, 224, 16)),
                                       conv_defs=mobilenet_v2.V2_DEF,
                                       output_stride=8,
                                       scope='MobilenetV2')
     self.assertEqual(out.get_shape().as_list()[1:3], [28, 28])
Exemple #2
0
 def testWithOutputStride16(self):
     tf.reset_default_graph()
     out, _ = mobilenet.mobilenet_base(tf.placeholder(
         tf.float32, (10, 224, 224, 16)),
                                       conv_defs=mobilenet_v2.V2_DEF,
                                       output_stride=16)
     self.assertEqual(out.get_shape().as_list()[1:3], [14, 14])
Exemple #3
0
 def testWithOutputStride8AndExplicitPadding(self):
     tf.reset_default_graph()
     out, _ = mobilenet.mobilenet_base(tf.placeholder(
         tf.float32, (10, 224, 224, 16)),
                                       conv_defs=mobilenet_v2.V2_DEF,
                                       output_stride=8,
                                       use_explicit_padding=True,
                                       scope='MobilenetV2')
     self.assertEqual(out.get_shape().as_list()[1:3], [28, 28])