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
7b33a43c
Commit
7b33a43c
authored
Nov 26, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
480bc6e6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
6 deletions
+16
-6
.github/ISSUE_TEMPLATE/unexpected-problems---bugs.md
.github/ISSUE_TEMPLATE/unexpected-problems---bugs.md
+2
-0
examples/FasterRCNN/README.md
examples/FasterRCNN/README.md
+1
-1
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+2
-0
examples/ResNet/README.md
examples/ResNet/README.md
+7
-5
tensorpack/callbacks/prof.py
tensorpack/callbacks/prof.py
+2
-0
tensorpack/train/trainers.py
tensorpack/train/trainers.py
+2
-0
No files found.
.github/ISSUE_TEMPLATE/unexpected-problems---bugs.md
View file @
7b33a43c
...
@@ -38,6 +38,8 @@ For example, CPU/GPU utilization, output images, tensorboard curves, if relevant
...
@@ -38,6 +38,8 @@ For example, CPU/GPU utilization, output images, tensorboard curves, if relevant
+
Tensorpack version:
`python -c 'import tensorpack; print(tensorpack.__version__)'`
.
+
Tensorpack version:
`python -c 'import tensorpack; print(tensorpack.__version__)'`
.
You can install Tensorpack master by
`pip install -U git+https://github.com/ppwwyyxx/tensorpack.git`
You can install Tensorpack master by
`pip install -U git+https://github.com/ppwwyyxx/tensorpack.git`
and see if your issue is already solved.
and see if your issue is already solved.
+
If you're not using tensorpack under a normal command line shell (e.g.,
using an IDE or jupyter notebook), please retry under a normal command line shell.
+
Hardware information, e.g. number of GPUs used.
+
Hardware information, e.g. number of GPUs used.
About efficiency issues, PLEASE first read http://tensorpack.readthedocs.io/en/latest/tutorial/performance-tuning.html
About efficiency issues, PLEASE first read http://tensorpack.readthedocs.io/en/latest/tutorial/performance-tuning.html
examples/FasterRCNN/README.md
View file @
7b33a43c
...
@@ -60,7 +60,7 @@ Not training with 8 GPUs may result in different performance from the table belo
...
@@ -60,7 +60,7 @@ Not training with 8 GPUs may result in different performance from the table belo
### Inference:
### Inference:
To predict on an image (
and show output in a window
):
To predict on an image (
needs DISPLAY to show the outputs
):
```
```
./train.py --predict input.jpg --load /path/to/model --config SAME-AS-TRAINING
./train.py --predict input.jpg --load /path/to/model --config SAME-AS-TRAINING
```
```
...
...
examples/FasterRCNN/train.py
View file @
7b33a43c
...
@@ -411,6 +411,8 @@ def predict(pred_func, input_file):
...
@@ -411,6 +411,8 @@ def predict(pred_func, input_file):
results
=
detect_one_image
(
img
,
pred_func
)
results
=
detect_one_image
(
img
,
pred_func
)
final
=
draw_final_outputs
(
img
,
results
)
final
=
draw_final_outputs
(
img
,
results
)
viz
=
np
.
concatenate
((
img
,
final
),
axis
=
1
)
viz
=
np
.
concatenate
((
img
,
final
),
axis
=
1
)
cv2
.
imwrite
(
"output.png"
,
viz
)
logger
.
info
(
"Inference output written to output.png"
)
tpviz
.
interactive_imshow
(
viz
)
tpviz
.
interactive_imshow
(
viz
)
...
...
examples/ResNet/README.md
View file @
7b33a43c
...
@@ -9,10 +9,10 @@ __Training__ code of three variants of ResNet on ImageNet:
...
@@ -9,10 +9,10 @@ __Training__ code of three variants of ResNet on ImageNet:
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__ 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.
Models trained with 8 GPUs and a total batch size of 256
is
listed in the table below.
Models trained with 8 GPUs and a total batch size of 256
are
listed in the table below.
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 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 ResNet recipe.
| Model | Top 5 Error | Top 1 Error | Download |
| Model | Top 5 Error | Top 1 Error | Download |
...
@@ -42,7 +42,7 @@ See the [tutorial](http://tensorpack.readthedocs.io/en/latest/tutorial/efficient
...
@@ -42,7 +42,7 @@ See the [tutorial](http://tensorpack.readthedocs.io/en/latest/tutorial/efficient
This script only converts and runs ImageNet-ResNet{50,101,152} Caffe models
[
released by MSRA
](
https://github.com/KaimingHe/deep-residual-networks
)
.
This script only converts and runs ImageNet-ResNet{50,101,152} Caffe models
[
released by MSRA
](
https://github.com/KaimingHe/deep-residual-networks
)
.
Note that the architecture is different from the
`imagenet-resnet.py`
script and the models are not compatible.
Note that the architecture is different from the
`imagenet-resnet.py`
script and the models are not compatible.
ResNets have evolved, generally you
should not cite these
numbers as baselines in your paper.
ResNets have evolved, generally you
'd better not cite these old
numbers as baselines in your paper.
Usage:
Usage:
```
bash
```
bash
...
@@ -53,7 +53,8 @@ python -m tensorpack.utils.loadcaffe PATH/TO/{ResNet-101-deploy.prototxt,ResNet-
...
@@ -53,7 +53,8 @@ python -m tensorpack.utils.loadcaffe PATH/TO/{ResNet-101-deploy.prototxt,ResNet-
```
```
The converted models are verified on ILSVRC12 validation set.
The converted models are verified on ILSVRC12 validation set.
The per-pixel mean used here is slightly different from the original.
The per-pixel mean used here is slightly different from the original, but has
negligible effect.
| Model | Top 5 Error | Top 1 Error |
| Model | Top 5 Error | Top 1 Error |
|:-------------------|-------------|------------:|
|:-------------------|-------------|------------:|
...
@@ -77,7 +78,8 @@ Reproduce the mixup pre-act ResNet-18 CIFAR10 experiment, in the paper:
...
@@ -77,7 +78,8 @@ Reproduce the mixup pre-act ResNet-18 CIFAR10 experiment, in the paper:
*
[
mixup: Beyond Empirical Risk Minimization
](
https://arxiv.org/abs/1710.09412
)
.
*
[
mixup: Beyond Empirical Risk Minimization
](
https://arxiv.org/abs/1710.09412
)
.
This implementation follows exact settings from the
[
author's code
](
https://github.com/hongyi-zhang/mixup
)
.
This implementation follows exact settings from the
[
author's code
](
https://github.com/hongyi-zhang/mixup
)
.
Note that the architecture is different from the offcial preact-ResNet18.
Note that the architecture is different from the offcial preact-ResNet18 in the
ResNet paper.
Usage:
Usage:
```
bash
```
bash
...
...
tensorpack/callbacks/prof.py
View file @
7b33a43c
...
@@ -53,6 +53,7 @@ class GPUUtilizationTracker(Callback):
...
@@ -53,6 +53,7 @@ class GPUUtilizationTracker(Callback):
assert
len
(
self
.
_devices
),
"[GPUUtilizationTracker] No GPU device given!"
assert
len
(
self
.
_devices
),
"[GPUUtilizationTracker] No GPU device given!"
def
_before_train
(
self
):
def
_before_train
(
self
):
assert
tf
.
test
.
is_gpu_available
()
self
.
_evt
=
mp
.
Event
()
self
.
_evt
=
mp
.
Event
()
self
.
_stop_evt
=
mp
.
Event
()
self
.
_stop_evt
=
mp
.
Event
()
self
.
_queue
=
mp
.
Queue
()
self
.
_queue
=
mp
.
Queue
()
...
@@ -212,6 +213,7 @@ class PeakMemoryTracker(Callback):
...
@@ -212,6 +213,7 @@ class PeakMemoryTracker(Callback):
self
.
_fetches
=
tf
.
train
.
SessionRunArgs
(
fetches
=
ops
)
self
.
_fetches
=
tf
.
train
.
SessionRunArgs
(
fetches
=
ops
)
def
_before_run
(
self
,
_
):
def
_before_run
(
self
,
_
):
assert
tf
.
test
.
is_gpu_available
(),
"PeakMemoryTracker only supports GPU!"
if
self
.
local_step
==
self
.
trainer
.
steps_per_epoch
-
1
:
if
self
.
local_step
==
self
.
trainer
.
steps_per_epoch
-
1
:
return
self
.
_fetches
return
self
.
_fetches
return
None
return
None
...
...
tensorpack/train/trainers.py
View file @
7b33a43c
...
@@ -430,6 +430,8 @@ class HorovodTrainer(SingleCostTrainer):
...
@@ -430,6 +430,8 @@ class HorovodTrainer(SingleCostTrainer):
except
AttributeError
:
# old horovod does not have local_size
except
AttributeError
:
# old horovod does not have local_size
pass
pass
super
(
HorovodTrainer
,
self
)
.
initialize
(
session_creator
,
session_init
)
super
(
HorovodTrainer
,
self
)
.
initialize
(
session_creator
,
session_init
)
if
not
tf
.
test
.
is_gpu_available
():
logger
.
error
(
"tf.test.is_gpu_available() == False"
)
# This broadcast belongs to the "intialize" stage
# This broadcast belongs to the "intialize" stage
# It should not be delayed to the "before_train" stage.
# It should not be delayed to the "before_train" stage.
...
...
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