Re: [theano-users] Differences between theano.shared and numpy.ndarray.

2017-08-28 Thread Frédéric Bastien
It is not a bug. Currently, by default the shape of a shared variable can changes during the execution. So we can't use the shape to determine the broadcasting pattern. You can pass the parameter broadcastable=() where you put the broadcast pattern. By default it is never broadcastable. Fred On

[theano-users] Differences between theano.shared and numpy.ndarray.

2017-08-24 Thread 佐藤優
I saw follown defferences: import theano import theano.tensor as T import numpy as np o = np.ones((1,2,3)) o2= np.ones((2,1)) o2_shared = theano.shared(ones((2, 1))) print((o2 + o).shape) print((o2_shared + o).shape) result is (1, 2, 3) [1 2 1] Maybe, broadcasting result is