lmjohns3 / theanets

Neural network toolkit for Python
http://theanets.rtfd.org
MIT License
328 stars 74 forks source link

AsTensorError #48

Closed mgellner closed 9 years ago

mgellner commented 9 years ago

Here's the traceback of code that worked with last (2 days old) revision. With the latest, it does not. If I revert, it works again.

I 2014-12-08 19:15:15 theanets.feedforward:161 hidden activation: logistic I 2014-12-08 19:15:15 theanets.feedforward:166 output activation: linear I 2014-12-08 19:15:15 theanets.feedforward:371 weights for layer 0: 75 x 512 Traceback (most recent call last): File "./thea.py", line 56, in global_backtracking=True, File "theanets/main.py", line 152, in init self.network = network_class(self.kwargs) File "theanets/feedforward.py", line 169, in init self.setup_layers(kwargs) File "theanets/feedforward.py", line 201, in setup_layers inputs = self.setup_encoder(**kwargs) File "theanets/feedforward.py", line 238, in setup_encoder self.preacts.append(TT.dot(z, W) + b) File "/usr/local/lib/python2.7/dist-packages/theano/tensor/basic.py", line 4725, in dot a, b = as_tensor_variable(a), as_tensor_variable(b) File "/usr/local/lib/python2.7/dist-packages/theano/tensor/basic.py", line 192, in as_tensor_variable raise AsTensorError("Cannot convert %s to TensorType" % str_x, type(x)) theano.tensor.var.AsTensorError: ('Cannot convert (W_0, 38400) to TensorType', <type 'tuple'>)

lmjohns3 commented 9 years ago

Sorry about that! I've been doing some refactoring in the feedforward networks today, and I checked in a couple of errors along the way. I believe this one has been fixed already, please try updating to the current head; reopen this if the bug is still there.