# HG changeset patch # User Pascal Lamblin # Date 1297729657 18000 # Node ID 8661f8ad407a7508ac25bc6a658b4678a69c16c8 # Parent dce602150b5fad25fdac5c236a61df8b8f68c98f Add a cast in the chain of transformation of initial data set diff -r dce602150b5f -r 8661f8ad407a pylearn/datasets/utlc.py --- a/pylearn/datasets/utlc.py Tue Feb 08 16:19:46 2011 -0500 +++ b/pylearn/datasets/utlc.py Mon Feb 14 19:27:37 2011 -0500 @@ -67,9 +67,14 @@ if normalize or normalize_on_the_fly: if normalize_on_the_fly: + # Shared variables of the original type train = theano.shared(train, borrow=True, name=name+"_train") valid = theano.shared(valid, borrow=True, name=name+"_valid") test = theano.shared(test, borrow=True, name=name+"_test") + # Symbolic variables cast into floatX + train = theano.tensor.cast(train, theano.config.floatX) + valid = theano.tensor.cast(valid, theano.config.floatX) + test = theano.tensor.cast(test, theano.config.floatX) else: train = numpy.asarray(train, theano.config.floatX) valid = numpy.asarray(valid, theano.config.floatX)