【发布时间】:2020-04-24 14:55:48
【问题描述】:
我应该使用哪一个来预处理图像。使用 keras 的 ImageDataGenerator 还是使用 tensorflow 的 tf.data? 哪个性能更好?
【问题讨论】:
标签: tensorflow keras deep-learning computer-vision
我应该使用哪一个来预处理图像。使用 keras 的 ImageDataGenerator 还是使用 tensorflow 的 tf.data? 哪个性能更好?
【问题讨论】:
标签: tensorflow keras deep-learning computer-vision
根据我的经验,应该使用 tf.data,因为在使用数据集上的 map 进行预处理时,可以通过调整并行调用的数量来进行优化。
例如:https://www.tensorflow.org/guide/data#decoding_image_data_and_resizing_it
并行化数据转换:https://www.tensorflow.org/guide/data_performance#parallelizing_data_transformation
【讨论】: