【发布时间】:2021-06-05 09:48:06
【问题描述】:
我知道以前有人问过这个问题,但我仍然面临一些问题。
建立神经元网络并训练模型后,我现在想对我桌面上的图像进行分类。出于这个原因,图像必须在监督学习之前准备好……
如何将普通图片转换为 (1, 28, 28) 格式?
我试过这样做
Img = imageio.imread(f‘path/pic.png‘)
Image = numpy.expand(Img, 0)
Print(Image.shape) RETURNS (1, 28, 28, 3) and NOT (1, 28, 28)
任何想法,灵感,...... 提前致谢
【问题讨论】:
标签: python python-3.x image rendering image-classification