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
413059b1
Commit
413059b1
authored
May 23, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
22375132
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
6 deletions
+10
-6
examples/FasterRCNN/dataset/coco.py
examples/FasterRCNN/dataset/coco.py
+1
-0
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+4
-1
examples/ResNet/README.md
examples/ResNet/README.md
+2
-2
examples/keras/README.md
examples/keras/README.md
+3
-2
examples/keras/mnist-keras.py
examples/keras/mnist-keras.py
+0
-1
No files found.
examples/FasterRCNN/dataset/coco.py
View file @
413059b1
...
@@ -171,6 +171,7 @@ class COCODetection(DatasetSplit):
...
@@ -171,6 +171,7 @@ class COCODetection(DatasetSplit):
# add the keys
# add the keys
img
[
'boxes'
]
=
boxes
# nx4
img
[
'boxes'
]
=
boxes
# nx4
assert
cls
.
min
()
>
0
,
"Category id in COCO format must > 0!"
img
[
'class'
]
=
cls
# n, always >0
img
[
'class'
]
=
cls
# n, always >0
img
[
'is_crowd'
]
=
is_crowd
# n,
img
[
'is_crowd'
]
=
is_crowd
# n,
if
add_mask
:
if
add_mask
:
...
...
examples/FasterRCNN/train.py
View file @
413059b1
...
@@ -25,8 +25,11 @@ except ImportError:
...
@@ -25,8 +25,11 @@ except ImportError:
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# "spawn/forkserver" is safer than the default "fork" method and
# produce more deterministic behavior & memory saving
# However its limitation is you cannot pass a lambda function to subprocesses.
import
multiprocessing
as
mp
import
multiprocessing
as
mp
mp
.
set_start_method
(
'spawn'
)
# safer behavior & memory saving
mp
.
set_start_method
(
'spawn'
)
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--load'
,
help
=
'load a model to start training from. Can overwrite BACKBONE.WEIGHTS'
)
parser
.
add_argument
(
'--load'
,
help
=
'load a model to start training from. Can overwrite BACKBONE.WEIGHTS'
)
parser
.
add_argument
(
'--logdir'
,
help
=
'log directory'
,
default
=
'train_log/maskrcnn'
)
parser
.
add_argument
(
'--logdir'
,
help
=
'log directory'
,
default
=
'train_log/maskrcnn'
)
...
...
examples/ResNet/README.md
View file @
413059b1
...
@@ -8,13 +8,13 @@ __Training__ code of 4 variants of ResNet on ImageNet:
...
@@ -8,13 +8,13 @@ __Training__ code of 4 variants of ResNet on ImageNet:
*
[
Squeeze-and-Excitation ResNet
](
https://arxiv.org/abs/1709.01507
)
*
[
Squeeze-and-Excitation ResNet
](
https://arxiv.org/abs/1709.01507
)
*
[
ResNeXt
](
https://arxiv.org/abs/1611.05431
)
*
[
ResNeXt
](
https://arxiv.org/abs/1611.05431
)
The training follows the exact recipe used by the
[
Training ImageNet in 1 Hour paper
](
https://arxiv.org/abs/1706.02677
)
The training follows the exact
standard
recipe used by the
[
Training ImageNet in 1 Hour paper
](
https://arxiv.org/abs/1706.02677
)
and gets the same performance.
and gets the same performance.
__Distributed training__
code & results can be found at
[
tensorpack/benchmarks
](
https://github.com/tensorpack/benchmarks/tree/master/ResNet-Horovod
)
.
__Distributed training__
code & results can be found at
[
tensorpack/benchmarks
](
https://github.com/tensorpack/benchmarks/tree/master/ResNet-Horovod
)
.
This recipe has better performance than most open source implementations.
This recipe has better performance than most open source implementations.
In fact, many papers that claim to "improve" ResNet by .5% only compete with a lower
In fact, many papers that claim to "improve" ResNet by .5% only compete with a lower
baseline and they actually cannot beat this ResNet recipe.
baseline and they actually cannot beat this
standard
ResNet recipe.
| Model | Top 5 Error | Top 1 Error | Download |
| Model | Top 5 Error | Top 1 Error | Download |
|:-----------------|:------------|:-----------:|:---------------------------------------------------------------------------------:|
|:-----------------|:------------|:-----------:|:---------------------------------------------------------------------------------:|
...
...
examples/keras/README.md
View file @
413059b1
...
@@ -17,9 +17,10 @@ are the only two tools I know that can scale the training of a large Keras model
...
@@ -17,9 +17,10 @@ are the only two tools I know that can scale the training of a large Keras model
There are two flavors where you can use a Keras model inside tensorpack:
There are two flavors where you can use a Keras model inside tensorpack:
1.
Write the tower function similar to a standard tensorpack program, but
use
some Keras layers in
1.
Write the tower function similar to a standard tensorpack program, but
mix
some Keras layers in
between. See
[
mnist-keras.py
](
mnist-keras.py
)
on how to do this.
between. See
[
mnist-keras.py
](
mnist-keras.py
)
on how to do this.
It does not support all tensorpack trainers.
It does not support all tensorpack trainers, and can be brittle due to
incompatibilities between Keras and tensorpack.
2.
The entire model to train is a Keras model (and there will be no
`ModelDesc`
, etc).
2.
The entire model to train is a Keras model (and there will be no
`ModelDesc`
, etc).
See
[
mnist-keras-v2.py
](
mnist-keras-v2.py
)
.
See
[
mnist-keras-v2.py
](
mnist-keras-v2.py
)
.
...
...
examples/keras/mnist-keras.py
View file @
413059b1
...
@@ -43,7 +43,6 @@ def get_keras_model():
...
@@ -43,7 +43,6 @@ def get_keras_model():
with
clear_tower0_name_scope
():
with
clear_tower0_name_scope
():
M
=
keras
.
models
.
Sequential
()
M
=
keras
.
models
.
Sequential
()
M
.
add
(
KL
.
Conv2D
(
32
,
3
,
activation
=
'relu'
,
padding
=
'same'
))
M
.
add
(
KL
.
Conv2D
(
32
,
3
,
activation
=
'relu'
,
padding
=
'same'
))
M
.
add
(
KL
.
BatchNormalization
())
M
.
add
(
KL
.
MaxPooling2D
())
M
.
add
(
KL
.
MaxPooling2D
())
M
.
add
(
KL
.
Conv2D
(
32
,
3
,
activation
=
'relu'
,
padding
=
'same'
))
M
.
add
(
KL
.
Conv2D
(
32
,
3
,
activation
=
'relu'
,
padding
=
'same'
))
M
.
add
(
KL
.
Conv2D
(
32
,
3
,
activation
=
'relu'
,
padding
=
'same'
))
M
.
add
(
KL
.
Conv2D
(
32
,
3
,
activation
=
'relu'
,
padding
=
'same'
))
...
...
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