【发布时间】:2019-08-23 01:36:48
【问题描述】:
无法使用 sklean 重塑 mnist 数据集中的图像 这是我代码的开始部分,只是加载数据
some_digit = X[880]
some_digit_image = some_digit.reshape(28, 28)
错误部分
ValueError Traceback (most recent call last)
<ipython-input-15-4d618bdb57bc> in <module>
1 some_digit = X[880]
----> 2 some_digit_image = some_digit.reshape(28,28)
ValueError: cannot reshape array of size 64 into shape (28,28)
【问题讨论】:
-
嗯,28 * 28 != 64,所以你显然不能这样重塑它们
标签: python-3.x image machine-learning reshape mnist