Reputation: 863
I'm working with RGB images and I'm using image generators because (1) they don't fit into memory and (2) I want to apply data augmentation.
I used to normalize my inputs to the range [0, 1]
before feeding them to a neural network. Now, I see there is a rescale
parameter in Keras ImageGenerator class. Does it replace the normalization if I say rescale=1/255.0
?
Upvotes: 0
Views: 127
Reputation: 1127
rescale
: rescaling factor. Defaults to None. If None or 0, no rescaling is applied, otherwise we multiply the data by the value provided (after applying all other transformations).
Essentially you can just use ImageDataGenerator()
to augment the dataset and after all steps, the data will be rescaled by the factor you provided.
Upvotes: 1