Commit 96845c19 authored by Jeremy Lewi's avatar Jeremy Lewi Committed by Sergio Guadarrama
Browse files

Add an option to make auxilary logits optional in inception v3. (#1862)

parent 3d97b007
......@@ -425,6 +425,7 @@ def inception_v3(inputs,
prediction_fn=slim.softmax,
spatial_squeeze=True,
reuse=None,
create_aux_logits=True,
scope='InceptionV3'):
"""Inception model from http://arxiv.org/abs/1512.00567.
......@@ -457,6 +458,7 @@ def inception_v3(inputs,
of shape [B, 1, 1, C], where B is batch_size and C is number of classes.
reuse: whether or not the network and its variables should be reused. To be
able to reuse 'scope' must be given.
create_aux_logits: Whether to create the auxiliary logits.
scope: Optional variable_scope.
Returns:
......@@ -481,6 +483,7 @@ def inception_v3(inputs,
depth_multiplier=depth_multiplier)
# Auxiliary Head logits
if create_aux_logits:
with slim.arg_scope([slim.conv2d, slim.max_pool2d, slim.avg_pool2d],
stride=1, padding='SAME'):
aux_logits = end_points['Mixed_6e']
......
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