The Keras documentation of ImageDataGenerator class
says—
width_shift_range: Float, 1-D array-like or int - float: fraction of total width, if < 1, or pixels if >= 1. - 1-D array-like: random elements from the array. - int: integer number of pixels from interval
(-width_shift_range, +width_shift_range)
- Withwidth_shift_range=2
possible values are integers[-1, 0, +1]
, same as withwidth_shift_range=[-1, 0, +1]
, while withwidth_shift_range=1.0
possible values are floats in the interval [-1.0, +1.0).
height_shift_range: Float, 1-D array-like or int - float: fraction of total height, if < 1, or pixels if >= 1. - 1-D array-like: random elements from the array. - int: integer number of pixels from interval
(-height_shift_range, +height_shift_range)
- Withheight_shift_range=2
possible values are integers[-1, 0, +1]
, same as withheight_shift_range=[-1, 0, +1]
, while withheight_shift_range=1.0
possible values are floats in the interval [-1.0, +1.0).
I’m new in Keras and machine learning, and I just have started learning it.
I am struggling to understand the documentation and use of these two arguments of Keras ImageDataGenerator class
, named width_shift_range
and height_shift_range
. I have searched out a lot, but couldn't find any good documentation other than the official. What exactly do these two arguments do? When have to use them?
This talk may seem inappropriate here, but since there is no discussion anywhere on the internet, I think it would be nice to have the discussion here.
If anyone helps me understanding these, I would be grateful. Thank you very much.