Thank you very much! I had a similar problem. I just subtracted one from 
all the y values and now it works fine.

vineri, 16 august 2013, 22:31:50 UTC+3, Pascal Lamblin a scris:
>
> Hi Petros, 
>
> On Fri, Aug 16, 2013, Petros Ypsilantis wrote: 
> >  I use data from matlab, despite the fact that I have managed to 
> transform 
> > my data in order to be theano readable and I don't have any problem 
> during 
> > the pre-training 
> > 
> > procedure of the dbn.py . During the fine-tuning I take the following 
> > massage: 
> > 
> >   
> > ValueError: y_i value out of bounds 
>
> It looks like you built a model with two output classes, which would be 
> 0 and 1, but some data examples have a different label, hence the "out 
> of bounds" message. 
>
> Is it possible that your targets are 1 and 2, instead of 0 and 1? I 
> think that matlab starts indexing at 1, but Python starts at 0, so that 
> might be the issue. 
>
> Since the target is not involved in the pre-training, that would explain 
> why the issue only appears during fine-tuning. 
>
> Hope this helps, 
>
> > Apply node that caused the error: 
> > CrossentropySoftmaxArgmax1HotWithBias(_dot22.0, b, 
> Elemwise{Cast{int32}}.0) 
> > Inputs shapes: [(10, 2), (2,), (10,)] 
> > Inputs strides: [(16, 8), (8,), (4,)] 
> > Inputs types: [TensorType(float64, matrix), TensorType(float64, vector), 
> > TensorType(int32, vector)] 
> > Use the Theano flag 'exception_verbosity=high' for a debugprint of this 
> > apply node. 
> > 
> > 
> > 
> > When I run again dbn.py using (THEANO_FLAGS="exception_verbosity=high") 
> I 
> > take the following error: 
> > 
> > 
> > 
> > ValueError: y_i value out of bounds 
> > Apply node that caused the error: 
> > CrossentropySoftmaxArgmax1HotWithBias(_dot22.0, b, 
> Elemwise{Cast{int32}}.0) 
> > Inputs shapes: [(10, 2), (2,), (10,)] 
> > Inputs strides: [(16, 8), (8,), (4,)] 
> > Inputs types: [TensorType(float64, matrix), TensorType(float64, vector), 
> > TensorType(int32, vector)] 
> > Debugprint of the apply node: 
> > CrossentropySoftmaxArgmax1HotWithBias.0 [@A] <TensorType(float64, 
> vector)> 
> > ''   
> >  |_dot22 [@B] <TensorType(float64, matrix)> ''   
> >  | |Elemwise{Composite{[scalar_sigmoid(add(i0, i1))]}}[(0, 0)] [@C] 
> > <TensorType(float64, matrix)> ''   
> >  | | |_dot22 [@D] <TensorType(float64, matrix)> ''   
> >  | | | |Elemwise{Composite{[scalar_sigmoid(add(i0, i1))]}}[(0, 0)] [@E] 
> > <TensorType(float64, matrix)> ''   
> >  | | | | |_dot22 [@F] <TensorType(float64, matrix)> ''   
> >  | | | | | |Elemwise{Composite{[scalar_sigmoid(add(i0, i1))]}}[(0, 0)] 
> [@G] 
> > <TensorType(float64, matrix)> ''   
> >  | | | | | | |_dot22 [@H] <TensorType(float64, matrix)> ''   
> >  | | | | | | | |Subtensor{int64:int64:} [@I] <TensorType(float64, 
> matrix)> 
> > ''   
> >  | | | | | | | | |<TensorType(float64, matrix)> [@J] 
> <TensorType(float64, 
> > matrix)> 
> >  | | | | | | | | |ScalarFromTensor [@K] <int64> ''   
> >  | | | | | | | | | |Elemwise{mul,no_inplace} [@L] <TensorType(int64, 
> > scalar)> ''   
> >  | | | | | | | | |   |TensorConstant{10} [@M] <TensorType(int64, 
> scalar)> 
> >  | | | | | | | | |   |index [@N] <TensorType(int64, scalar)> 
> >  | | | | | | | | |ScalarFromTensor [@O] <int64> ''   
> >  | | | | | | | |   |Elemwise{Composite{[mul(i0, add(i1, i2))]}} [@P] 
> > <TensorType(int64, scalar)> ''   
> >  | | | | | | | |     |TensorConstant{10} [@M] <TensorType(int64, 
> scalar)> 
> >  | | | | | | | |     |TensorConstant{1} [@Q] <TensorType(int64, scalar)> 
> >  | | | | | | | |     |index [@N] <TensorType(int64, scalar)> 
> >  | | | | | | | |W [@R] <TensorType(float64, matrix)> 
> >  | | | | | | |InplaceDimShuffle{x,0} [@S] <TensorType(float64, row)> '' 
>   
> >  | | | | | |   |b [@T] <TensorType(float64, vector)> 
> >  | | | | | |W [@U] <TensorType(float64, matrix)> 
> >  | | | | |InplaceDimShuffle{x,0} [@V] <TensorType(float64, row)> ''   
> >  | | | |   |b [@W] <TensorType(float64, vector)> 
> >  | | | |W [@X] <TensorType(float64, matrix)> 
> >  | | |InplaceDimShuffle{x,0} [@Y] <TensorType(float64, row)> ''   
> >  | |   |b [@Z] <TensorType(float64, vector)> 
> >  | |W [@BA] <TensorType(float64, matrix)> 
> >  |b [@BB] <TensorType(float64, vector)> 
> >  |Elemwise{Cast{int32}} [@BC] <TensorType(int32, vector)> ''   
> >    |Subtensor{int64:int64:} [@BD] <TensorType(float32, vector)> ''   
> >      |<TensorType(float32, vector)> [@BE] <TensorType(float32, vector)> 
> >      |ScalarFromTensor [@K] <int64> ''   
> >      |ScalarFromTensor [@O] <int64> ''   
> > CrossentropySoftmaxArgmax1HotWithBias.1 [@A] <TensorType(float64, 
> matrix)> 
> > ''   
> > CrossentropySoftmaxArgmax1HotWithBias.2 [@A] <TensorType(int32, vector)> 
> '' 
> >   
> > 
> > 
> > 
> > Does anybody have an idea what  is the problem? 
> > 
> > 
> > Thanks 
> > 
> > Petros 
> > 
> > -- 
> > 
> > --- 
> > 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] <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
>
> -- 
> Pascal 
>

-- 

--- 
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.

Reply via email to