Theano broadcasting different to numpy's Theano broadcasting different to numpy's numpy numpy

Theano broadcasting different to numpy's


Theano need all broadcastable dimensions to be declared in the graph before compilation. NumPy use the run time shape information.

By default, all shared variable dimsions aren't broadcastable, as their shape could change.

To create the shared variable with the broadcastable dimension that you need in your example:

b = theano.shared(bval, broadcastable=(True,False))

I'll add this information to the documentation.