Skip to content

Commit

Permalink
move fc7 location.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinlei Chen committed Aug 7, 2017
1 parent b9958d5 commit 3b93142
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/nets/mobilenet_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ def _head_to_tail(self, pool5, is_training):
starting_layer=12,
depth_multiplier=self._depth_multiplier,
scope=self._scope)
# average pooling done by reduce_mean
fc7 = tf.reduce_mean(fc7, axis=[1, 2])
return fc7

def _build_network(self, is_training=True):
Expand All @@ -266,8 +268,6 @@ def _build_network(self, is_training=True):

fc7 = self._head_to_tail(pool5, is_training)
with tf.variable_scope(self._scope, 'MobilenetV1'):
# average pooling done by reduce_mean
fc7 = tf.reduce_mean(fc7, axis=[1, 2])
# region classification
cls_prob, bbox_pred = self._region_classification(fc7, is_training,
initializer, initializer_bbox)
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 @@ -115,6 +115,8 @@ def _head_to_tail(self, pool5, is_training):
global_pool=False,
include_root_block=False,
scope=self._resnet_scope)
# average pooling done by reduce_mean
fc7 = tf.reduce_mean(fc7, axis=[1, 2])
return fc7

def _build_network(self, is_training=True):
Expand Down Expand Up @@ -166,8 +168,6 @@ def _build_network(self, is_training=True):

fc7 = self._head_to_tail(pool5, is_training)
with tf.variable_scope(self._resnet_scope, self._resnet_scope):
# average pooling done by reduce_mean
fc7 = tf.reduce_mean(fc7, axis=[1, 2])
# region classification
cls_prob, bbox_pred = self._region_classification(fc7, is_training,
initializer, initializer_bbox)
Expand Down

0 comments on commit 3b93142

Please sign in to comment.