Python Theano ValueError: y_i value out of bounds

参考 https://groups.google.com/forum/#!topic/theano-users/tY3fNAPYd9k

 

这个问题是由于outs的数量没有设置对。

里面写到 

“except that you should specify "n_out=6", because there are 6 
different target classes (numbered from 0 to 5 inclusively). ”

也就是说n_out设置为6的话,Test_Y中的label值只能是0 1 2 3 4 5

 

比如,我要做三元分类,那么我的label只能定义成 0 1 2

posted @ 2014-08-01 22:25  油焖大黄瓜  阅读(919)  评论(0编辑  收藏  举报