Removed explicit assignment of theano to gpu, see if I still encounter the TypeError bug.