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
diff options
context:
space:
mode:
authornicholas-leonard <nick@nikopia.org>2015-01-06 23:39:09 +0300
committernicholas-leonard <nick@nikopia.org>2015-01-06 23:39:09 +0300
commit5b198168ebaa330e0530fe67f4e08f0b8c1114ba (patch)
tree58166cf5fc8083d50c6bd0f3a343f6afb2bea76c
parent3c4f8c551f5859702c828cd085b4d1752e9c7655 (diff)
container doc
-rw-r--r--doc/containers.md29
1 files changed, 25 insertions, 4 deletions
diff --git a/doc/containers.md b/doc/containers.md
index f529267..81d9e46 100644
--- a/doc/containers.md
+++ b/doc/containers.md
@@ -1,13 +1,34 @@
<a name="nn.Containers"/>
# Containers #
Complex neural networks are easily built using container classes:
- * [Sequential](#nn.Sequential) : plugs layers in a feed-forward fully connected manner ;
- * [Parallel](#nn.Parallel) : applies its `ith` child module to the `ith` slice of the input Tensor ;
- * [Concat](#nn.Concat) : concatenates in one layer several modules along dimension `dim` ;
- * [DepthConcat](#nn.DepthConcat) : like Concat, but adds zero-padding when non-`dim` sizes don't match;
+ * [Container](#nn.Container) : abstract class inherited by containers ;
+ * [Sequential](#nn.Sequential) : plugs layers in a feed-forward fully connected manner ;
+ * [Parallel](#nn.Parallel) : applies its `ith` child module to the `ith` slice of the input Tensor ;
+ * [Concat](#nn.Concat) : concatenates in one layer several modules along dimension `dim` ;
+ * [DepthConcat](#nn.DepthConcat) : like Concat, but adds zero-padding when non-`dim` sizes don't match;
See also the [Table Containers](#nn.TableContainers) for manipulating tables of [Tensors](https://github.com/torch/torch7/blob/master/doc/tensor.md).
+<a name="nn.Container"/>
+## Container ##
+
+This is an abstract [Module](module.md#nn.Module) class which declares methods defined in all containers.
+It reimplements many of the Module methods such that calls are propagated to the
+contained modules. For example, a call to [zeroGradParameters](module.md#nn.Module.zeroGradParameters)
+will be propagated to all contained modules.
+
+<a name="nn.Container.add"/>
+### add(module) ###
+Adds the given `module` to the container. The order is important
+
+<a name="nn.Container.get"/>
+### get(index) ###
+Returns the contained modules at index `index`.
+
+<a name="nn.Container.size"/>
+### size() ###
+Returns the number of contained modules.
+
<a name="nn.Sequential"/>
## Sequential ##