Merge pull request #2201 from jeffdonahue/tutorial-fixes
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 15 May 2015 01:42:02 +0000 (18:42 -0700)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 15 May 2015 01:42:02 +0000 (18:42 -0700)
Update docs for ND blobs (#1970) and layer type is a string (#1694)

1  2 
docs/tutorial/layers.md

@@@ -417,50 -417,11 +417,50 @@@ The `Split` layer is a utility layer th
  
  #### Flattening
  
- The `FLATTEN` layer is a utility layer that flattens an input of shape `n * c * h * w` to a simple vector output of shape `n * (c*h*w) * 1 * 1`.
+ The `Flatten` layer is a utility layer that flattens an input of shape `n * c * h * w` to a simple vector output of shape `n * (c*h*w)`
  
 +#### Reshape
 +
 +* Layer type: `Reshape`
 +* Implementation: `./src/caffe/layers/reshape_layer.cpp`
 +* Parameters (`ReshapeParameter reshape_param`)
 +    - Optional: (also see detailed description below)
 +        - `shape`
 +
 +* Input
 +    - a single blob with arbitrary dimensions
 +* Output
 +    - the same blob, with modified dimensions, as specified by `reshape_param`
 +
 +* Sample
 +
 +        layer {
 +          name: "reshape"
 +          type: "Reshape"
 +          bottom: "input"
 +          top: "output"
 +          reshape_param {
 +            shape {
 +              dim: 0  # copy the dimension from below
 +              dim: 2
 +              dim: 3
 +              dim: -1 # infer it from the other dimensions
 +            }
 +          }
 +        }
 +
 +The `Reshape` layer can be used to change the dimensions of its input, without changing its data. Just like the `Flatten` layer, only the dimensions are changed; no data is copied in the process.
 +
 +Output dimensions are specified by the `ReshapeParam` proto. Positive numbers are used directly, setting the corresponding dimension of the output blob. In addition, two special values are accepted for any of the target dimension values:
 +
 +* **0** means "copy the respective dimension of the bottom layer". That is, if the bottom has 2 as its 1st dimension, the top will have 2 as its 1st dimension as well, given `dim: 0` as the 1st target dimension.
 +* **-1** stands for "infer this from the other dimensions". This behavior is similar to that of -1 in *numpy*'s or `[]` for *MATLAB*'s reshape: this dimension is calculated to keep the overall element count the same as in the bottom layer. At most one -1 can be used in a reshape operation.
 +
 +As another example, specifying `reshape_param { shape { dim: 0 dim: -1 } }` makes the layer behave in exactly the same way as the `Flatten` layer.
 +
  #### Concatenation
  
- * LayerType: `CONCAT`
+ * Layer type: `Concat`
  * CPU implementation: `./src/caffe/layers/concat_layer.cpp`
  * CUDA GPU implementation: `./src/caffe/layers/concat_layer.cu`
  * Parameters (`ConcatParameter concat_param`)