Skip to content

Commit

Permalink
Merge pull request #160 from f0k/doc-input-layer-shape
Browse files Browse the repository at this point in the history
Document variable `InputLayer` shape dimensions
  • Loading branch information
benanne committed Mar 9, 2015
2 parents 4a1cfe9 + 29ff203 commit eca3305
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lasagne/layers/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ class InputLayer(Layer):
created.
:parameters:
- shape : tuple of int
The shape of the input
- shape : tuple of `int` or `None` elements
The shape of the input. Any element can be `None` to indicate
that the size of that dimension is not fixed at compile time.
- input_var : Theano symbolic variable or None (default: None)
- input_var : Theano symbolic variable or `None` (default: `None`)
A variable representing a network input. If it is not provided,
a variable will be created.
:usage:
>>> from lasagne.layers import InputLayer
>>> l_in = InputLayer((100, 20))
:note:
The first dimension usually indicates the batch size. If you specify
it, Theano may apply more optimizations while compiling the training
or prediction function, but the compiled function will not accept
data of a different batch size at runtime. To compile for a variable
batch size, set the first shape element to `None` instead.
"""
def __init__(self, shape, input_var=None, name=None, **kwargs):
self.shape = shape
Expand Down

0 comments on commit eca3305

Please sign in to comment.