python报错ValueError: Found input variables with inconsistent numbers of samples: [x,y]

出现这种错误是因为在训练的过程中,测试图片(train_images)和测试标签(train_labels)的长度必须一致。

也就是说你有60000张训练数据,就必须有60000张标签,这样才可以匹配。

总的来说,二者长度(个数)必须一样即可。

猜你喜欢

转载自blog.csdn.net/weixin_38648232/article/details/85084422