Mercurial > pylearn
comparison algorithms/logistic_regression.py @ 501:4fb6f7320518
N-class logistic regression top-layer works
author | Joseph Turian <turian@gmail.com> |
---|---|
date | Tue, 28 Oct 2008 13:54:01 -0400 |
parents | a419edf4e06c |
children | 17945defd813 |
comparison
equal
deleted
inserted
replaced
500:3c60c2db0319 | 501:4fb6f7320518 |
---|---|
6 from theano import compile | 6 from theano import compile |
7 | 7 |
8 import numpy as N | 8 import numpy as N |
9 | 9 |
10 class LogRegInstanceType(module.FancyModuleInstance): | 10 class LogRegInstanceType(module.FancyModuleInstance): |
11 def initialize(self, n_in, n_out=1, rng=N.random): | 11 def initialize(self, n_in, n_out=1, rng=N.random, seed=None): |
12 #self.component is the LogisticRegressionTemplate instance that built this guy. | 12 #self.component is the LogisticRegressionTemplate instance that built this guy. |
13 """ | |
14 @todo: Remove seed. Used only to keep Stacker happy. | |
15 """ | |
13 | 16 |
14 self.w = N.zeros((n_in, n_out)) | 17 self.w = N.zeros((n_in, n_out)) |
15 self.b = N.zeros(n_out) | 18 self.b = N.zeros(n_out) |
16 self.lr = 0.01 | 19 self.lr = 0.01 |
17 self.__hide__ = ['params'] | 20 self.__hide__ = ['params'] |