Commit cfae6938 authored by Yuxin Wu's avatar Yuxin Wu

update docs

parent 2d07bc0a
...@@ -41,6 +41,17 @@ l = func(l, *args, **kwargs) ...@@ -41,6 +41,17 @@ l = func(l, *args, **kwargs)
l = FullyConnected('fc1', l, 10, nl=tf.identity) l = FullyConnected('fc1', l, 10, nl=tf.identity)
``` ```
### Access Internal Variables:
Access the variables like this:
```python
l = Conv2D('conv1', l, 32, 3)
print(l.variables.W)
print(l.variables.b)
```
The names are documented in API documentation.
Note that this method doesn't work with LinearWrap, and cannot access the variables created by an activation function.
### Use Models outside Tensorpack ### Use Models outside Tensorpack
You can use tensorpack models alone as a simple symbolic function library. You can use tensorpack models alone as a simple symbolic function library.
......
...@@ -135,6 +135,7 @@ class DumpTensor(Callback): ...@@ -135,6 +135,7 @@ class DumpTensor(Callback):
Args: Args:
names (list[str]): names of tensors names (list[str]): names of tensors
""" """
assert isinstance(names, (list, tuple)), names
self._names = names self._names = names
self._dir = logger.LOG_DIR self._dir = logger.LOG_DIR
......
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