I'm not able to help with the information provided. I will need at least the full error message. If you also a script that reproduce that, it could also help.
Fred On Wed, Apr 19, 2017 at 3:15 AM Arthi Venkataraman <[email protected]> wrote: > Hi, > Getting TypeError: iteration over a 0-d array with Theano version > '0.9.0.dev-388805f946685e86225cdf602eb8a4f0059f9667' > > Happens when calling the defined function. > self.trainfunc = > theano.function([inquery,inmemory,learningrate,yin,yin1,yin2,yin4], > cost,updates=updates,allow_input_downcast = True) > > cost,v1,v2,v3 = mem_network.trainfunc(query,data_train, > learningrate,yval1,yval,yval2,yval) > > Error does not come when running the same in debug mode as called below : > mode = > theano.compile.MonitorMode(post_func=detect_nan).excluding('local_elemwise_fusion', > 'inplace') > self.trainfunc = > theano.function([inquery,inmemory,learningrate,yin,yin1,yin2,yin4], > [cost,v1,v2,output],updates=updates,allow_input_downcast = True, mode=mode) > > There are no zero dimensional arrays in the call. > These are the values of the parameters. > query = np.zeros((sent_len),dtype=np.int) > yval1 = numpy.zeros((batch_size,sent_len,embsize),dtype=numpy.float64) # > Batchsize * Seqlen * Emb dim 3d > yval = numpy.zeros((batch_size,sent_len,embsize),dtype=numpy.float64) # > Batchsize * Seqlen * Emb dim 3d > yval2 = numpy.zeros((sent_len,vocabsize),dtype=numpy.float64) # Seqlen > * Vocabsize 2d > > > > > -- > > --- > You received this message because you are subscribed to the Google Groups > "theano-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
