One of your labels is too large, or possibly too small. Are your labels from 0 to n-1 or 1 to n? They should be 0 to n-1.
On Tuesday, September 6, 2016 at 2:19:18 AM UTC-7, Beatriz G. wrote: > > HI everyone > > I am trying to use 4 dimension image, but I get the following error and I > do not know what it means: > > ValueError: y_i value out of bounds > Apply node that caused the error: > CrossentropySoftmaxArgmax1HotWithBias(Dot22.0, b, Subtensor{int64:int64:}.0) > Toposort index: 34 > Inputs types: [TensorType(float64, matrix), TensorType(float64, vector), > TensorType(int32, vector)] > Inputs shapes: [(20, 4), (4,), (20,)] > Inputs strides: [(32, 8), (8,), (4,)] > Inputs values: ['not shown', array([ 0., 0., 0., 0.]), 'not shown'] > Outputs clients: > [[Sum{acc_dtype=float64}(CrossentropySoftmaxArgmax1HotWithBias.0)], > [CrossentropySoftmax1HotWithBiasDx(Elemwise{Inv}[(0, 0)].0, > CrossentropySoftmaxArgmax1HotWithBias.1, Subtensor{int64:int64:}.0)], []] > > Backtrace when the node is created(use Theano flag traceback.limit=N to > make it longer): > File "/home/beaa/Escritorio/Theano/Separando_Lenet.py", line 446, in > <module> > evaluate_lenet5() > File "/home/beaa/Escritorio/Theano/Separando_Lenet.py", line 257, in > evaluate_lenet5 > cost = layer3.negative_log_likelihood(y) > File "/home/beaa/Escritorio/Theano/logistic_sgd.py", line 146, in > negative_log_likelihood > return -T.mean(T.log(self.p_y_given_x)[T.arange(y.shape[0]), y]) > > HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and > storage map footprint of this apply node. > > > Here is how I give the data to the layers: > > > layer0 = LeNetConvPoolLayer( > rng, > input=layer0_input, > image_shape=(batch_size, 4, 104, 52), > filter_shape=(nkerns[0], 4, 5, 5), > poolsize=(2, 2) > ) > > > layer1 = LeNetConvPoolLayer( > rng, > input=layer0.output, > image_shape=(batch_size, nkerns[0], 50, 24), > filter_shape=(nkerns[1], nkerns[0], 5, 5), > poolsize=(2, 2) > > > > My data is 104*52*4. > > > Thanks in advance. Regards. > > -- --- 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 theano-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.