Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
30240eae
Commit
30240eae
authored
Aug 03, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freeze BN use nonfuse implementation
parent
c34a3501
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
.github/ISSUE_TEMPLATE.md
.github/ISSUE_TEMPLATE.md
+2
-2
examples/FasterRCNN/README.md
examples/FasterRCNN/README.md
+2
-2
examples/FasterRCNN/model_frcnn.py
examples/FasterRCNN/model_frcnn.py
+2
-2
tensorpack/models/batch_norm.py
tensorpack/models/batch_norm.py
+6
-5
No files found.
.github/ISSUE_TEMPLATE.md
View file @
30240eae
...
@@ -28,8 +28,8 @@ About efficiency issues, PLEASE first read http://tensorpack.readthedocs.io/en/l
...
@@ -28,8 +28,8 @@ About efficiency issues, PLEASE first read http://tensorpack.readthedocs.io/en/l
(See http://tensorpack.readthedocs.io/en/latest/tutorial/index.html#extend-tensorpack).
(See http://tensorpack.readthedocs.io/en/latest/tutorial/index.html#extend-tensorpack).
It does not have to be added to Tensorpack unless you have a good reason.
It does not have to be added to Tensorpack unless you have a good reason.
+
"Could you improve/implement an example/paper ?"
+
"Could you improve/implement an example/paper ?"
-- the answer is: we have no plans to do so
and w
e don't take feature requests for
-- the answer is: we have no plans to do so
. W
e don't take feature requests for
examples. If you don't know how to do it, you may ask a usage question.
examples
or implement a paper for you
. If you don't know how to do it, you may ask a usage question.
## Usage Questions:
## Usage Questions:
...
...
examples/FasterRCNN/README.md
View file @
30240eae
...
@@ -73,8 +73,8 @@ MaskRCNN results contain both box and mask mAP.
...
@@ -73,8 +73,8 @@ MaskRCNN results contain both box and mask mAP.
| Backbone | mAP
<br/>
(box;mask) | Detectron mAP
<sup>
[
1
](
#ft1
)
</sup><br/>
(box;mask) | Time on 8 V100s | Configurations
<br/>
(click to expand) |
| Backbone | mAP
<br/>
(box;mask) | Detectron mAP
<sup>
[
1
](
#ft1
)
</sup><br/>
(box;mask) | Time on 8 V100s | Configurations
<br/>
(click to expand) |
| - | - | - | - | - |
| - | - | - | - | - |
| R50-C4 | 33.
1
| | 18h |
<details><summary>
super quick
</summary>
`MODE_MASK=False FRCNN.BATCH_PER_IM=64`
<br/>
`PREPROC.SHORT_EDGE_SIZE=600 PREPROC.MAX_SIZE=1024`
<br/>
`TRAIN.LR_SCHEDULE=[150000,230000,280000]`
</details>
|
| R50-C4 | 33.
8
| | 18h |
<details><summary>
super quick
</summary>
`MODE_MASK=False FRCNN.BATCH_PER_IM=64`
<br/>
`PREPROC.SHORT_EDGE_SIZE=600 PREPROC.MAX_SIZE=1024`
<br/>
`TRAIN.LR_SCHEDULE=[150000,230000,280000]`
</details>
|
| R50-C4 | 3
6.6
| 36.5 | 44h |
<details><summary>
standard
</summary>
`MODE_MASK=False`
</details>
|
| R50-C4 | 3
7.1
| 36.5 | 44h |
<details><summary>
standard
</summary>
`MODE_MASK=False`
</details>
|
| R50-FPN | 37.5 | 37.9 | 30h |
<details><summary>
standard
</summary>
`MODE_MASK=False MODE_FPN=True`
</details>
|
| R50-FPN | 37.5 | 37.9 | 30h |
<details><summary>
standard
</summary>
`MODE_MASK=False MODE_FPN=True`
</details>
|
| R50-C4 | 38.5;33.7
[
:arrow_down:
](
http://models.tensorpack.com/FasterRCNN/COCO-R50C4-MaskRCNN-Standard.npz
)
| 37.8;32.8 | 49h |
<details><summary>
standard
</summary>
`MODE_MASK=True`
</details>
|
| R50-C4 | 38.5;33.7
[
:arrow_down:
](
http://models.tensorpack.com/FasterRCNN/COCO-R50C4-MaskRCNN-Standard.npz
)
| 37.8;32.8 | 49h |
<details><summary>
standard
</summary>
`MODE_MASK=True`
</details>
|
| R50-FPN | 38.8;35.4
[
:arrow_down:
](
http://models.tensorpack.com/FasterRCNN/COCO-R50FPN-MaskRCNN-Standard.npz
)
| 38.6;34.5 | 32h |
<details><summary>
standard
</summary>
`MODE_MASK=True MODE_FPN=True`
</details>
|
| R50-FPN | 38.8;35.4
[
:arrow_down:
](
http://models.tensorpack.com/FasterRCNN/COCO-R50FPN-MaskRCNN-Standard.npz
)
| 38.6;34.5 | 32h |
<details><summary>
standard
</summary>
`MODE_MASK=True MODE_FPN=True`
</details>
|
...
...
examples/FasterRCNN/model_frcnn.py
View file @
30240eae
...
@@ -226,7 +226,7 @@ def fastrcnn_2fc_head(feature, num_classes):
...
@@ -226,7 +226,7 @@ def fastrcnn_2fc_head(feature, num_classes):
num_classes(int): num_category + 1
num_classes(int): num_category + 1
Returns:
Returns:
cls_logits (Nxnum_class), reg_logits (Nx num_class-1 x 4)
outputs of `fastrcnn_outputs()`
"""
"""
dim
=
cfg
.
FPN
.
FRCNN_FC_HEAD_DIM
dim
=
cfg
.
FPN
.
FRCNN_FC_HEAD_DIM
init
=
tf
.
variance_scaling_initializer
()
init
=
tf
.
variance_scaling_initializer
()
...
@@ -245,7 +245,7 @@ def fastrcnn_Xconv1fc_head(feature, num_classes, num_convs, norm=None):
...
@@ -245,7 +245,7 @@ def fastrcnn_Xconv1fc_head(feature, num_classes, num_convs, norm=None):
norm (str or None): either None or 'GN'
norm (str or None): either None or 'GN'
Returns:
Returns:
cls_logits (Nxnum_class), reg_logits (Nx num_class-1 x 4)
outputs of `fastrcnn_outputs()`
"""
"""
assert
norm
in
[
None
,
'GN'
],
norm
assert
norm
in
[
None
,
'GN'
],
norm
l
=
feature
l
=
feature
...
...
tensorpack/models/batch_norm.py
View file @
30240eae
...
@@ -156,10 +156,10 @@ def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5,
...
@@ -156,10 +156,10 @@ def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5,
training
=
ctx
.
is_training
training
=
ctx
.
is_training
training
=
bool
(
training
)
training
=
bool
(
training
)
TF_version
=
get_tf_version_tuple
()
TF_version
=
get_tf_version_tuple
()
if
not
training
and
ctx
.
is_training
:
freeze_bn_backward
=
not
training
and
ctx
.
is_training
if
freeze_bn_backward
:
assert
TF_version
>=
(
1
,
4
),
\
assert
TF_version
>=
(
1
,
4
),
\
"Fine tuning a BatchNorm model with fixed statistics is only "
\
"Fine tuning a BatchNorm model with fixed statistics needs TF>=1.4!"
"supported after https://github.com/tensorflow/tensorflow/pull/12580 "
if
ctx
.
is_main_training_tower
:
# only warn in first tower
if
ctx
.
is_main_training_tower
:
# only warn in first tower
logger
.
warn
(
"[BatchNorm] Using moving_mean/moving_variance in training."
)
logger
.
warn
(
"[BatchNorm] Using moving_mean/moving_variance in training."
)
# Using moving_mean/moving_variance in training, which means we
# Using moving_mean/moving_variance in training, which means we
...
@@ -176,7 +176,8 @@ def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5,
...
@@ -176,7 +176,8 @@ def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5,
center
=
center
,
scale
=
scale
,
center
=
center
,
scale
=
scale
,
beta_initializer
=
beta_initializer
,
beta_initializer
=
beta_initializer
,
gamma_initializer
=
gamma_initializer
,
gamma_initializer
=
gamma_initializer
,
fused
=
(
ndims
==
4
and
axis
in
[
1
,
3
]),
# https://github.com/tensorflow/tensorflow/issues/10857#issuecomment-410185429
fused
=
(
ndims
==
4
and
axis
in
[
1
,
3
]
and
not
freeze_bn_backward
),
_reuse
=
tf
.
get_variable_scope
()
.
reuse
)
_reuse
=
tf
.
get_variable_scope
()
.
reuse
)
if
TF_version
>=
(
1
,
5
):
if
TF_version
>=
(
1
,
5
):
tf_args
[
'virtual_batch_size'
]
=
virtual_batch_size
tf_args
[
'virtual_batch_size'
]
=
virtual_batch_size
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment