keras-team/keras-preprocessing

affine_transformations.py random_shift function tx ty?

chenying99 opened this issue · 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

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