Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNicholas Leonard <nleonard@twitter.com>2017-05-24 22:49:01 +0300
committerNicholas Leonard <nleonard@twitter.com>2017-05-24 22:49:01 +0300
commitbbcf8295c75ef860576781b3cb45bec73d400f4b (patch)
tree7baf4185af0ff59e677a0b096d290bd915f2d17f /doc
parentf66ca966595af65dcf84aa7173b6bba597958fff (diff)
PrintSize
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/simple.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/simple.md b/doc/simple.md
index 25d4063..de2f46d 100755
--- a/doc/simple.md
+++ b/doc/simple.md
@@ -60,6 +60,7 @@ Simple Modules are used for various tasks like adapting Tensor methods and provi
* [Constant](#nn.Constant) : outputs a constant value given an input (which is ignored);
* [WhiteNoise](#nn.WhiteNoise) : adds isotropic Gaussian noise to the signal when in training mode;
* [OneHot](#nn.OneHot) : transforms a tensor of indices into [one-hot](https://en.wikipedia.org/wiki/One-hot) encoding;
+ * [PrintSize](#nn.PrintSize) : prints the size of `input` and `gradOutput` (useful for debugging);
<a name="nn.Linear"></a>
## Linear ##
@@ -1750,3 +1751,15 @@ oh:forward(torch.Tensor{{3,2,1},{1,2,3}})
0 0 1 0 0
[torch.DoubleTensor of size 2x3x5]
```
+
+<a name='nn.PrintSize'></a>
+## PrintSize ##
+
+```lua
+module = nn.PrintSize(name)
+```
+
+This module is useful for debugging complicated module composites.
+It prints the size of the `input` and `gradOutput` during `forward`
+and `backward` propagation respectively.
+The `name` is a string used to identify the module along side the printed size. \ No newline at end of file