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
eb97cf1e
Commit
eb97cf1e
authored
Feb 21, 2019
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update docs
parent
7b9d9b8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
8 deletions
+36
-8
docs/tutorial/inference.md
docs/tutorial/inference.md
+3
-3
docs/tutorial/training-interface.md
docs/tutorial/training-interface.md
+6
-3
examples/FasterRCNN/NOTES.md
examples/FasterRCNN/NOTES.md
+27
-2
No files found.
docs/tutorial/inference.md
View file @
eb97cf1e
...
@@ -63,7 +63,7 @@ The example in [examples/basics/export-model.py](../examples/basics/export-model
...
@@ -63,7 +63,7 @@ The example in [examples/basics/export-model.py](../examples/basics/export-model
### Exporter
### Exporter
In addition to the standard checkpoint format tensorpack saved for you during training,
In addition to the standard checkpoint format tensorpack saved for you during training,
you can also save your models into other formats so it may be more friendly for inference.
you can also save your models into other formats
after training,
so it may be more friendly for inference.
1.
Export to
`SavedModel`
format for TensorFlow Serving:
1.
Export to
`SavedModel`
format for TensorFlow Serving:
...
@@ -133,7 +133,7 @@ with TowerContext('', is_training=False):
...
@@ -133,7 +133,7 @@ with TowerContext('', is_training=False):
```
```
```
eval_rst
```
eval_rst
.. note:: **Do not use metagraph for inference!**
.
.. note:: **Do not use metagraph for inference!**
Metagraph is the wrong abstraction for a "model".
Metagraph is the wrong abstraction for a "model".
It stores the entire graph which contains not only the mathematical model, but also all the
It stores the entire graph which contains not only the mathematical model, but also all the
...
@@ -155,7 +155,7 @@ with TowerContext('', is_training=False):
...
@@ -155,7 +155,7 @@ with TowerContext('', is_training=False):
### Step 2: load the checkpoint
### Step 2: load the checkpoint
You can just use
`tf.train.Saver`
for all the work.
You can just use
`tf.train.Saver`
for all the work.
Alternatively, use tensorpack's
`
SaverRestore
(path).init(tf.get_default_session())`
Alternatively, use tensorpack's
`
get_model_loader
(path).init(tf.get_default_session())`
Now, you've already built a graph for inference, and the checkpoint is loaded.
Now, you've already built a graph for inference, and the checkpoint is loaded.
You may now:
You may now:
...
...
docs/tutorial/training-interface.md
View file @
eb97cf1e
...
@@ -62,8 +62,10 @@ The function `launch_train_with_config(config, trainer)`
...
@@ -62,8 +62,10 @@ The function `launch_train_with_config(config, trainer)`
uses the raw trainer interface and is almost equivalent to the following two lines of code:
uses the raw trainer interface and is almost equivalent to the following two lines of code:
```
python
```
python
trainer
.
setup_graph
(
trainer
.
setup_graph
(
my_model
.
get_inputs_desc
(),
my_input_source
,
# or QueueInput(my_dataflow)
my_model
.
get_inputs_desc
(),
my_model
.
build_graph
,
my_model
.
get_optimizer
)
my_input_source
,
# or QueueInput(my_dataflow)
my_model
.
build_graph
,
my_model
.
get_optimizer
)
trainer
.
train_with_defaults
(
trainer
.
train_with_defaults
(
callbacks
=
config
.
callbacks
,
callbacks
=
config
.
callbacks
,
monitors
=
config
.
monitors
,
monitors
=
config
.
monitors
,
...
@@ -76,7 +78,8 @@ trainer.train_with_defaults(
...
@@ -76,7 +78,8 @@ trainer.train_with_defaults(
```
```
If you need more control (e.g., if you want to construct the callbacks after
If you need more control (e.g., if you want to construct the callbacks after
setting up the graph), you can write the above two lines by yourself instead.
setting up the graph), you can write the above two lines by yourself instead.
You don't need to construct a
`TrainConfig`
any more in that case.
The function
`launch_train_with_config`
exists mainly for historical reasons.
### Keras Interface
### Keras Interface
...
...
examples/FasterRCNN/NOTES.md
View file @
eb97cf1e
...
@@ -67,9 +67,34 @@ Speed:
...
@@ -67,9 +67,34 @@ Speed:
Possible Future Enhancements:
Possible Future Enhancements:
1.
Define a better interface to load
custom dataset
.
1.
Define a better interface to load
different datasets
.
1.
Support batch>1 per GPU.
1.
Support batch>1 per GPU. Batching with inconsistent shapes is
non-trivial to implement in TensorFlow.
1.
Use dedicated ops to improve speed. (e.g. a TF implementation of ROIAlign op
1.
Use dedicated ops to improve speed. (e.g. a TF implementation of ROIAlign op
can be found in
[
light-head RCNN
](
https://github.com/zengarden/light_head_rcnn/tree/master/lib/lib_kernel
)
)
can be found in
[
light-head RCNN
](
https://github.com/zengarden/light_head_rcnn/tree/master/lib/lib_kernel
)
)
### TensorFlow version notes
TensorFlow ≥ 1.6 supports most common features in this R-CNN implementation.
However, each version of TensorFlow has bugs that I either reported or fixed,
and this implementation touches many of those bugs.
Therefore, not every version of TF ≥ 1.6 supports every feature in this implementation.
This implementation contains workaround for some of those TF bugs.
However, note that the workaround needs to check your TF version by
`tf.VERSION`
and may not detect bugs properly if your TF version is not an official release
(e.g., if you use a nighly build).
1.
TF < 1.6: Nothing works due to lack of support for empty tensors
(
[
PR
](
https://github.com/tensorflow/tensorflow/pull/15264
)
)
and
`FrozenBN`
training
(
[
PR
](
https://github.com/tensorflow/tensorflow/pull/12580
)
).
1.
TF < 1.10:
`SyncBN`
with NCCL will fail (
[
PR
](
https://github.com/tensorflow/tensorflow/pull/20360
)
).
1.
TF 1.11 & 1.12: multithread inference will fail (
[
issue
](
https://github.com/tensorflow/tensorflow/issues/22750
)
).
Latest tensorpack will apply a workaround.
1.
TF > 1.12: MKL inference will fail (
[
issue
](
https://github.com/tensorflow/tensorflow/issues/24650
)
).
1.
TF > 1.12: Horovod training will fail (
[
issue
](
https://github.com/tensorflow/tensorflow/issues/25946
)
).
Latest tensorpack will apply a workaround.
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