keras-team / keras-preprocessing

Utilities for working with image data, text data, and sequence data.
Other
1.02k stars 444 forks source link

affine_transformations.py random_shift function tx ty? #348

Open chenying99 opened 2 years ago

chenying99 commented 2 years ago

keras-preprocessing/keras_preprocessing/image/affine_transformations.py

line 85 86

tx = np.random.uniform(-hrg, hrg) h ty = np.random.uniform(-wrg, wrg) w

should be:

ty = np.random.uniform(-hrg, hrg) h tx = np.random.uniform(-wrg, wrg) w

StanislawAntol commented 2 years ago

Perhaps this was a bug introduced to work around the buggy code that was fixed in this PR?