From e072189ff2cde45ad5874d738efbfdb6d5fcd5f3 Mon Sep 17 00:00:00 2001 From: Francois Chollet Date: Tue, 3 Dec 2024 14:48:47 -0800 Subject: [PATCH] Minor fix --- .../layers/preprocessing/image_preprocessing/equalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keras/src/layers/preprocessing/image_preprocessing/equalization.py b/keras/src/layers/preprocessing/image_preprocessing/equalization.py index 3de1a6b9d33..e58f4b254c0 100644 --- a/keras/src/layers/preprocessing/image_preprocessing/equalization.py +++ b/keras/src/layers/preprocessing/image_preprocessing/equalization.py @@ -143,7 +143,7 @@ def _equalize_channel(self, channel, value_range): def _apply_equalization(self, channel, hist): cdf = self.backend.numpy.cumsum(hist) - if backend.backend() == "jax": + if self.backend.name == "jax": mask = cdf > 0 first_nonzero_idx = self.backend.numpy.argmax(mask) cdf_min = self.backend.numpy.take(cdf, first_nonzero_idx)