keras-preprocessing icon indicating copy to clipboard operation
keras-preprocessing copied to clipboard

affine_transformations.py random_shift function tx ty?

Open chenying99 opened this issue 3 years ago • 1 comments

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

chenying99 avatar Oct 02 '21 06:10 chenying99

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

StanislawAntol avatar Mar 08 '22 19:03 StanislawAntol