图像数据生成器中已经存在错误
generator = tf.keras.preprocessing.image.ImageDataGenerator(featurewise_center=False,
samplewise_center=False,
featurewise_std_normalization=False,
samplewise_std_normalization=False,
zca_whitening=False,
rotation_range=0,
width_shift_range=0.0,
height_shift_range=0.0,
brightness_range=None,
shear_range=0.0,
zoom_range=0.0,
channel_shift_range=0.0,
cval=0.0,
horizontal_flip=False,
vertical_flip=False,
rescale=1./255,
preprocessing_function=None,
data_format=None,
validation_split=0.0,
dtype=None)
我在这一行中已经存在错误。它仅在Anaconda的基础环境中起作用。即使已安装了所需的库,它在其他环境中也无效
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在使用上述API和最新依赖项之后,没有帮助不建议新代码,被 devered 。
使用 tf.data.dataaset 带有预处理层。
有关更多信息,请参阅教程,以获取加载图像和增强图像的教程,以及预处理层指南。
Having used the mentioned api with the latest dependencies won't help as tf.keras.preprocessing.image.ImageDataGenerator is not recommended for new code , being Deprecated.
Use the tf.keras.utils.image_dataset_from_directory and transforming the output tf.data.Dataset with preprocessing layers.
For more information, see the tutorials for loading images and augmenting images, as well as the preprocessing layer guide here.