title: Understanding `width_shift_range` and `height_shift_range` arguments in Keras's ImageDataGenerator class
body: <p>The Keras documentation of <code>ImageDataGenerator class</code> says—</p>
  <blockquote>
  <p><strong>width_shift_range:</strong> Float, 1-D array-like or int - float: fraction of total width, if &lt; 1, or pixels if &gt;= 1. - 1-D array-like: random elements from the array. - int: integer number of pixels from interval <code>(-width_shift_range, +width_shift_range)</code> - With <code>width_shift_range=2</code> possible values are integers <code>[-1, 0, +1]</code>, same as with <code>width_shift_range=[-1, 0, +1]</code>, while with <code>width_shift_range=1.0</code> possible values are floats in the interval [-1.0, +1.0).</p>
  </blockquote>
  <blockquote>
  <p><strong>height_shift_range:</strong> Float, 1-D array-like or int - float: fraction of total height, if &lt; 1, or pixels if &gt;= 1. - 1-D array-like: random elements from the array. - int: integer number of pixels from interval <code>(-height_shift_range, +height_shift_range)</code> - With <code>height_shift_range=2</code> possible values are integers <code>[-1, 0, +1]</code>, same as with <code>height_shift_range=[-1, 0, +1]</code>, while with <code>height_shift_range=1.0</code> possible values are floats in the interval [-1.0, +1.0).</p>
  </blockquote>
  <p>I’m new in Keras and machine learning, and I just have started learning it.</p>
  <p>I am struggling to understand the documentation and use of these two arguments of Keras  <a href="https://keras.io/api/preprocessing/image/#imagedatagenerator-class" rel="noreferrer"><code>ImageDataGenerator class</code></a>, named <code>width_shift_range</code> and <code>height_shift_range</code>. 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?</p>
  <p>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.</p>
  <p>If anyone helps me understanding these, I would be grateful. Thank you very much.</p>