Skip to content

Commit

Permalink
Fix default options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinlei Chen committed Oct 7, 2017
1 parent 5dd8e2c commit c6fae28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/nets/mobilenet_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def mobilenet_v1_base(inputs,
min_depth=8,
depth_multiplier=1.0,
output_stride=None,
reuse=False,
reuse=None,
scope=None):
"""Mobilenet v1.
Constructs a Mobilenet v1 network from inputs to the given final endpoint.
Expand Down Expand Up @@ -211,7 +211,7 @@ def __init__(self):
self._depth_multiplier = cfg.MOBILENET.DEPTH_MULTIPLIER
self._scope = 'MobilenetV1'

def _image_to_head(self, is_training, reuse=False):
def _image_to_head(self, is_training, reuse=None):
# Base bottleneck
assert (0 <= cfg.MOBILENET.FIXED_LAYERS <= 12)
net_conv = self._image
Expand All @@ -237,7 +237,7 @@ def _image_to_head(self, is_training, reuse=False):

return net_conv

def _head_to_tail(self, pool5, is_training, reuse=False):
def _head_to_tail(self, pool5, is_training, reuse=None):
with slim.arg_scope(mobilenet_v1_arg_scope(is_training=is_training)):
fc7 = mobilenet_v1_base(pool5,
_CONV_DEFS[12:],
Expand Down
4 changes: 2 additions & 2 deletions lib/nets/resnet_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _build_base(self):

return net

def _image_to_head(self, is_training, reuse=False):
def _image_to_head(self, is_training, reuse=None):
assert (0 <= cfg.RESNET.FIXED_BLOCKS <= 3)
# Now the base is always fixed during training
with slim.arg_scope(resnet_arg_scope(is_training=False)):
Expand All @@ -112,7 +112,7 @@ def _image_to_head(self, is_training, reuse=False):

return net_conv

def _head_to_tail(self, pool5, is_training, reuse=False):
def _head_to_tail(self, pool5, is_training, reuse=None):
with slim.arg_scope(resnet_arg_scope(is_training=is_training)):
fc7, _ = resnet_v1.resnet_v1(pool5,
self._blocks[-1:],
Expand Down
4 changes: 2 additions & 2 deletions lib/nets/vgg16.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self):
self._feat_compress = [1. / float(self._feat_stride[0]), ]
self._scope = 'vgg_16'

def _image_to_head(self, is_training, reuse=False):
def _image_to_head(self, is_training, reuse=None):
with tf.variable_scope(self._scope, self._scope, reuse=reuse):
net = slim.repeat(self._image, 2, slim.conv2d, 64, [3, 3],
trainable=False, scope='conv1')
Expand All @@ -45,7 +45,7 @@ def _image_to_head(self, is_training, reuse=False):

return net

def _head_to_tail(self, pool5, is_training, reuse=False):
def _head_to_tail(self, pool5, is_training, reuse=None):
with tf.variable_scope(self._scope, self._scope, reuse=reuse):
pool5_flat = slim.flatten(pool5, scope='flatten')
fc6 = slim.fully_connected(pool5_flat, 4096, scope='fc6')
Expand Down

0 comments on commit c6fae28

Please sign in to comment.