📜  将 jpg 图像转换为 conv2d 的数组 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.904000             🧑  作者: Mango

代码示例1
all_images = []
for image_path in os.listdir(path):
  img = io.imread(image_path , as_grey=True)
  img = img.reshape([WIDTH, HEIGHT, 1])
  all_images.append(img)
x_train = np.array(all_images)