diff --git a/ffcv/transforms/utils/fast_crop.py b/ffcv/transforms/utils/fast_crop.py index fbb13db4..34cb7835 100644 --- a/ffcv/transforms/utils/fast_crop.py +++ b/ffcv/transforms/utils/fast_crop.py @@ -16,7 +16,7 @@ def resize_crop(source, start_row, end_row, start_col, end_col, destination): @njit(parallel=False, fastmath=True, inline='always') def get_random_crop(height, width, scale, ratio): area = height * width - log_ratio = np.log(np.array(ratio)) + log_ratio = np.log(ratio) for _ in range(10): target_area = area * np.random.uniform(scale[0], scale[1]) aspect_ratio = np.exp(np.random.uniform(log_ratio[0], log_ratio[1])) @@ -48,4 +48,4 @@ def get_center_crop(height, width, ratio): delta_h = (height - c) // 2 delta_w = (width - c) // 2 - return delta_h, delta_w, c, c \ No newline at end of file + return delta_h, delta_w, c, c