Commit 1cd986d3 authored by Yuxin Wu's avatar Yuxin Wu

update docs about build model outside of tensorpack

parent a1477a75
...@@ -72,6 +72,13 @@ with TowerContext('', is_training=True): ...@@ -72,6 +72,13 @@ with TowerContext('', is_training=True):
# call any tensorpack layer # call any tensorpack layer
``` ```
Some layers (in particular ``BatchNorm``) has different train/test time behavior which is controlled
by ``TowerContext``. If you need to use the tensorpack version of them in test time, you'll need to create the ops for them under another context.
```python
with tf.variable_scope(tf.get_variable_scope(), reuse=True), TowerContext('predict', is_training=False):
# build the graph again
```
### Use Other Symbolic Libraries within Tensorpack ### Use Other Symbolic Libraries within Tensorpack
When defining the model you can construct the graph using whatever library you feel comfortable with. When defining the model you can construct the graph using whatever library you feel comfortable with.
......
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