Unverified Commit 62ce5d2a authored by pkulzc's avatar pkulzc Committed by GitHub
Browse files

Object detection and slim changes (#5843)

Add more eval metrics to model_main and support group norm for mobilenet v1 based models.
parents 7d032ea3 a1337e01
This diff is collapsed.
...@@ -390,5 +390,21 @@ class NASNetTest(tf.test.TestCase): ...@@ -390,5 +390,21 @@ class NASNetTest(tf.test.TestCase):
self.assertListEqual(predictions.get_shape().as_list(), self.assertListEqual(predictions.get_shape().as_list(),
[batch_size, num_classes]) [batch_size, num_classes])
def testUseBoundedAcitvationCifarModel(self):
batch_size = 1
height, width = 32, 32
num_classes = 10
for use_bounded_activation in (True, False):
tf.reset_default_graph()
inputs = tf.random_uniform((batch_size, height, width, 3))
config = nasnet.cifar_config()
config.set_hparam('use_bounded_activation', use_bounded_activation)
with slim.arg_scope(nasnet.nasnet_cifar_arg_scope()):
_, _ = nasnet.build_nasnet_cifar(
inputs, num_classes, config=config)
for node in tf.get_default_graph().as_graph_def().node:
if node.op.startswith('Relu'):
self.assertEqual(node.op == 'Relu6', use_bounded_activation)
if __name__ == '__main__': if __name__ == '__main__':
tf.test.main() tf.test.main()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment