python 数据编码器_用Keras训练我的数据自动编码器

我有一个自动编码器写在Keras,如下所示。但是,我有以下错误:ValueError: Error when checking model input: the list of Numpy arrays

that you are passing to your model is not the size the model expected.

Expected to see 1 arrays but instead got the following list of 374 arrays

前提是374是我的训练图像的数量。在

在这种情况下,如何根据数据训练自动编码器?在

^{pr2}$

谢谢。在

编辑

我添加了以下内容而不是for循环:training_generator = ImageDataGenerator()

validation_generator = ImageDataGenerator()

training_images = training_generator.flow_from_directory(training_directory, class_mode='input')

validation_images = validation_generator.flow_from_directory(validation_directory, class_mode='input')

但是,得到了以下信息:TypeError: Error when checking model input: data should be a Numpy

array, or list/dict of Numpy arrays. Found

...

这句话发生了什么:autoencoder.fit(

training_images,

epochs=10,

batch_size=20,

shuffle=True,

validation_data=validation_images)

有什么想法吗?在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值