高层API出现维度错误怎么解
收藏
高层API中model.fit出现如此报错IndexError: (OutOfRange) label value should less than the shape of axis dimension when label value(4) not equal to ignore_index(-100), But received label value as 4 and shape of axis dimension is 2 [Hint: Expected lbl < axis_dim, but received lbl:4 >= axis_dim:2.] (at /paddle/paddle/fluid/operators/math/cross_entropy.cc:75) [operator < softmax_with_cross_entropy > error]
0
收藏
请登录后评论
最终的输出维度有问题吧,调整一下输出的维度看下
最后证实是分类数小于输出维度数。
那具体怎么解决呀