Commit 32e70abf authored by Yuxin Wu's avatar Yuxin Wu

update docs

parent 4cde005e
Potential Bugs/Feature Requests/Usage Questions Only:
An issue has to be one of the following:
1. Unexpected Problems / Potential Bugs
2. Feature Requests
3. Usage Questions
Any unexpected problems: __PLEASE ALWAYS INCLUDE__:
1. What you did:
......@@ -18,17 +21,17 @@ Any unexpected problems: __PLEASE ALWAYS INCLUDE__:
5. About efficiency, PLEASE first read http://tensorpack.readthedocs.io/en/latest/tutorial/performance-tuning.html
Feature Requests:
+ Improve an existing feature, or add a new feature.
+ You can implement a lot of features by extending 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.
+ We don't take feature requests for examples.
+ We don't take feature requests for implementing new techniques.
If you don't know how, ask it as a usage question.
Usage Questions:
+ Read the [tutorials](http://tensorpack.readthedocs.io/en/latest/tutorial/index.html#user-tutorials) first.
+ We answer "HOW to do X in tensorpack" for a specific well-defined X.
We don't answer general machine learning questions,
such as "how to improve my model" or "I don't understand the paper".
such as "what networks to use" or "I don't understand the paper".
You can also use gitter (https://gitter.im/tensorpack/users) for more casual discussions.
......@@ -230,8 +230,9 @@ Let me summarize what this DataFlow does:
3. The main process takes data from the pipe, makes batches.
The two DataFlow mentioned in this tutorial (both random read and sequential read) can run at a speed of 1k ~ 2.5k images per second if you have good CPUs, RAM, disks.
With fewer augmentations, it can reach 5k images/s.
As a reference, tensorpack can train ResNet-18 at 1.2k images/s on 4 old TitanX.
A DGX-1 (8 P100s) can train ResNet-50 at 1.7k images/s according to the [official benchmark](https://www.tensorflow.org/performance/benchmarks).
8 P100s can train ResNet-50 at 1.7k images/s according to the [official benchmark](https://www.tensorflow.org/performance/benchmarks).
So DataFlow will not be a serious bottleneck if configured properly.
## Distributed DataFlow
......
......@@ -53,10 +53,10 @@ MaskRCNN results contain both bbox and segm mAP.
|Backbone|`FASTRCNN_BATCH`|resolution |schedule|mAP (bbox/segm)|Time |
| - | - | - | - | - | - |
|R-50 |64 |(600, 1024)|280k |33.0 |22h on 8 P100|
|R-50 |64 |(600, 1024)|280k |33.1 |18h on 8 V100|
|R-50 |512 |(800, 1333)|280k |35.6 |55h on 8 P100|
|R-50 |512 |(800, 1333)|360k |36.7 |49h on 8 V100|
|R-50 |256 |(800, 1333)|280k |36.9/32.3 |39h on 8 P100|
|R-50 |256 |(800, 1333)|280k |36.8/32.1 |39h on 8 P100|
|R-50 |512 |(800, 1333)|360k |37.7/33.0 |72h on 8 P100|
|R-101 |512 |(800, 1333)|280k |40.1/34.4 |70h on 8 P100|
......
......@@ -84,6 +84,7 @@ class TowerContext(object):
def get_collection_in_tower(self, key):
"""
Get items from this collection that are added in the current tower.
These items may or may not start with the same prefix as the tower.
"""
return self._collection_guard.get_collection_in_tower(key)
......@@ -336,6 +337,7 @@ class TowerTensorHandle(object):
def get_collection(self, name):
"""
Get items from a collection that are added in this tower.
These items may or may not start with the same prefix as the tower.
Args:
name (str): the name of the collection
......
......@@ -78,11 +78,25 @@ class TowerTrainer(Trainer):
Returns a callable predictor built under ``TowerContext(is_training=False)``.
Args:
input_names (list), output_names(list): list of names
input_names (list): list of input names, matching the inputs declared for the trainer.
output_names(list): list of tensor names without the tower prefix.
device (int): build the predictor on device '/gpu:{device}' or use -1 for '/cpu:0'.
Returns:
an :class:`OnlinePredictor`.
Examples:
.. code-block:: none
# in the graph:
interesting_tensor = tf.identity(x, name='fun')
# in _setup_graph callback method:
self._predictor = self.trainer.get_predictor(['input1'], ['fun'])
# After session is initialized (see Tutorials - Write a Callback), can use it by:
outputs = self._predictor(inputs)
The CycleGAN example and DQN example have more concrete use of this method.
"""
assert self.tower_func is not None, "Must set tower_func on the trainer to use get_predictor()!"
tower_name = 'tower-pred-{}'.format(device) if device >= 0 else 'tower-pred-cpu'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment