https://www.mindspore.cn/tutorials/zh-CN/r2.2/beginner/dataset.html
def visualize(dataset):
figure = plt.figure(figsize=(4, 4))
cols, rows = 3, 3
plt.subplots_adjust(wspace=0.5, hspace=0.5)
for idx, (image, label) in enumerate(dataset.create_tuple_iterator()):
figure.add_subplot(rows, cols, idx + 1)
plt.title(int(label))
plt.axis("off")
plt.imshow(image.asnumpy().squeeze(), cmap="gray")
if idx == cols * rows - 1:
break
plt.show()
这里是真的无法运行啊,mindspore版本2.2.14,python3.7,报这个错误:
RuntimeError: Exception thrown from dataset pipeline. Refer to 'Dataset Pipeline Error Message'.
Dataset Pipeline Error Message:
[ERROR] Invalid data, MnistDataset API can't read the data file (interface mismatch or no data found). Check mnist file in directory: MNIST_Data/train.
\source\mnist_op.cc(229).
Please assign maintainer to check this issue.
请为此issue分配处理人。
@fangwenyi @chengxiaoli @Shawny
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
感谢您的提问,您可以评论//mindspore-assistant更快获取帮助:
问题与#I9K4C2:文档反馈-教程重复,关闭
登录 后才可以发表评论