Skip to content

Commit

Permalink
Minor layer docstring fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
f0k committed Jul 20, 2015
1 parent 38b0595 commit 0f1f278
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lasagne/layers/dense.py
Expand Up @@ -123,7 +123,7 @@ class NINLayer(Layer):
W=lasagne.init.GlorotUniform(), b=lasagne.init.Constant(0.),
nonlinearity=lasagne.nonlinearities.rectify, **kwargs)
Network-in-network layer [1]_.
Network-in-network layer.
Like DenseLayer, but broadcasting across all trailing dimensions beyond the
2nd. This results in a convolution operation with filter size 1 on all
trailing dimensions. Any number of trailing dimensions is supported,
Expand Down
6 changes: 6 additions & 0 deletions lasagne/layers/dnn.py
Expand Up @@ -105,6 +105,12 @@ def get_output_for(self, input, **kwargs):


class MaxPool2DDNNLayer(Pool2DDNNLayer): # for consistency
"""
2D max-pooling layer
Subclass of :class:`Pool2DDNNLayer` fixing ``mode='max'``, provided for
compatibility to other ``MaxPool2DLayer`` classes.
"""
def __init__(self, incoming, pool_size, stride=None,
pad=(0, 0), **kwargs):
super(MaxPool2DDNNLayer, self).__init__(incoming, pool_size, stride,
Expand Down
10 changes: 5 additions & 5 deletions lasagne/layers/noise.py
Expand Up @@ -14,7 +14,7 @@


class DropoutLayer(Layer):
"""Dropout layer [1]_, [2]_
"""Dropout layer
Sets values to zero with probability p. See notes for disabling dropout
during testing.
Expand All @@ -32,7 +32,7 @@ class DropoutLayer(Layer):
Notes
-----
The dropout layer is a regularizer that randomly sets input values to
zero, see references for why this might improve generalization.
zero; see [1]_, [2]_ for why this might improve generalization.
During training you should set deterministic to false and during
testing you should set deterministic to true.
Expand Down Expand Up @@ -86,16 +86,16 @@ def get_output_for(self, input, deterministic=False, **kwargs):


class GaussianNoiseLayer(Layer):
"""Gaussian noise layer [1]_.
"""Gaussian noise layer.
Add zero Gaussian noise with mean 0 and std sigma to the input
Add zero-mean Gaussian noise of given standard deviation to the input [1]_.
Parameters
----------
incoming : a :class:`Layer` instance or a tuple
the layer feeding into this layer, or the expected input shape
sigma : float or tensor scalar
Std of added Gaussian noise
Standard deviation of added Gaussian noise
Notes
-----
Expand Down
2 changes: 1 addition & 1 deletion lasagne/layers/pool.py
Expand Up @@ -364,7 +364,7 @@ def get_output_for(self, input, **kwargs):

class FeatureWTALayer(Layer):
"""
'Winner Take' All layer
'Winner Take All' layer
This layer performs 'Winner Take All' (WTA) across feature maps: zero out
all but the maximal activation value within a region.
Expand Down

0 comments on commit 0f1f278

Please sign in to comment.