# HG changeset patch # User Joseph Turian # Date 1225210179 14400 # Node ID 7560817a07e829d17fd521dce9846fa3e4c2fa41 # Parent 02a331ba833b6481dacdf0881c331c462b79cf4a nnet_ops => nnet diff -r 02a331ba833b -r 7560817a07e8 algorithms/logistic_regression.py --- a/algorithms/logistic_regression.py Tue Oct 28 11:40:56 2008 -0400 +++ b/algorithms/logistic_regression.py Tue Oct 28 12:09:39 2008 -0400 @@ -1,6 +1,6 @@ import theano from theano import tensor as T -from theano.tensor import nnet_ops +from theano.tensor import nnet from theano.compile import module from theano import printing, pprint from theano import compile @@ -30,7 +30,7 @@ self.params = [p for p in [self.w, self.b] if p.owner is None] - xent, y = nnet_ops.crossentropy_softmax_1hot( + xent, y = nnet.crossentropy_softmax_1hot( T.dot(self.x, self.w) + self.b, self.targ) sum_xent = T.sum(xent) @@ -70,7 +70,7 @@ self.params = [p for p in [self.w, self.b] if p.owner is None] - y = nnet_ops.sigmoid(T.dot(self.x, self.w)) + y = nnet.sigmoid(T.dot(self.x, self.w)) xent = -self.targ * T.log(y) - (1.0 - self.targ) * T.log(1.0 - y) sum_xent = T.sum(xent)