ValueError: Error when checking target: expected dense_2 to have 2 dimensions, but got array with sh
ValueError: Error when checking target: expected dense_2 to have 2 dimensions, but got array with shape (5000, 1, 10)错误一般都是数据维度错误,keras训练中,mnist和cifar10数据集对y的数据要求不同,cifar10数据集训练时必须y为2维的,可以用np.squezee缩掉无用的维度,如5000,1,10,弄成5000,10....
原创
2020-05-21 15:53:07 ·
3936 阅读 ·
1 评论