keras ImageDataGenerator 用法

xiaoxiao2021-02-28  4

datagen = ImageDataGenerator( rotation_range=3, # featurewise_std_normalization=True, fill_mode='nearest', width_shift_range=0.2, height_shift_range=0.2, horizontal_flip=True ) train_generator = datagen.flow_from_directory( path+'/train', target_size=(224, 224), batch_size=batch_size,)

I have a custom generator for my multi output model like:

a = np.arange(8).reshape(2, 4) # print(a) print(train_generator.filenames) def generate(): while 1: x,y = train_generator.next() yield [x] ,[a,y]
转载请注明原文地址: https://www.6miu.com/read-2350156.html

最新回复(0)