Keras可以一次只加载一个批次的数据,因为我的图像数据集大小为40GB。
如果数据集很小,我可以使用ImageDataGenerator生成批次,但由于数据集很大,我无法将所有图像都加载到内存中。
在Keras中是否有类似以下TensorFlow代码的方法:
path_queue = tf.train.string_input_producer(input_paths, shuffle= False)
paths, contents = reader.read(path_queue)
inputs = decode(contents)
input_batch = tf.train.batch([inputs], batch_size=2)
我正在使用这种方法在tensorflow中对输入进行序列化,但我不知道如何在Keras中实现此任务。
train_on_batch
是怎么样的呢? - desertnaut