首页 PaddleCV 帖子详情
高层API出现维度错误怎么解 已解决
收藏
快速回复
PaddleCV 问答图像分类 2867 3
高层API出现维度错误怎么解 已解决
收藏
快速回复
PaddleCV 问答图像分类 2867 3

高层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]

被褐怀玉
已解决
3# 回复于2021-08
最后证实是分类数小于输出维度数。
0
收藏
回复
全部评论(3)
时间顺序
TC.Long
#2 回复于2021-08

最终的输出维度有问题吧,调整一下输出的维度看下

0
回复
被褐怀玉
#3 回复于2021-08

最后证实是分类数小于输出维度数。

0
回复
M
Magician丶Mxn
#4 回复于2023-04

那具体怎么解决呀

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户