From 25784d534e1089290da486f7071a2ba9678e39f1 Mon Sep 17 00:00:00 2001 From: Ying Zhang Date: Tue, 20 Jan 2015 08:37:06 -0500 Subject: [PATCH 1/2] add docstring --- pylearn2/models/mlp.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pylearn2/models/mlp.py b/pylearn2/models/mlp.py index 4224b1f19a..92d8637c6e 100755 --- a/pylearn2/models/mlp.py +++ b/pylearn2/models/mlp.py @@ -315,9 +315,15 @@ def set_biases(self, biases): def get_weights_format(self): """ - .. todo:: + Returns a description of how to interpret the weights of the layer. + + Returns + ------- + format: tuple + Either ('v', 'h') or ('h', 'v'). + ('v', 'h') means a weight matrix of shape(num visible units, num hidden units), + while ('h', 'v') means the transpose of it. - WRITEME """ raise NotImplementedError From 1b66a794b24a334fc3e39dd85298343feb6f8b09 Mon Sep 17 00:00:00 2001 From: Ying Zhang Date: Tue, 20 Jan 2015 11:09:03 -0500 Subject: [PATCH 2/2] fixed --- pylearn2/models/mlp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pylearn2/models/mlp.py b/pylearn2/models/mlp.py index 70878dc869..97c5b272c1 100755 --- a/pylearn2/models/mlp.py +++ b/pylearn2/models/mlp.py @@ -302,7 +302,8 @@ def get_weights_format(self): ------- format: tuple Either ('v', 'h') or ('h', 'v'). - ('v', 'h') means a weight matrix of shape(num visible units, num hidden units), + ('v', 'h') means a weight matrix of shape + (num visible units, num hidden units), while ('h', 'v') means the transpose of it. """