keras-team/keras · error · ValueError
rmax should be greater than rmin in the `renorm_clipping` ar
Error message
rmax should be greater than rmin in the `renorm_clipping` argument. Received: rmax={rmax}, rmin={rmin}. What it means
Error "rmax should be greater than rmin in the `renorm_clipping` argument. Received: rmax={rmax}, rmin={rmin}." thrown in keras-team/keras.
Source
Thrown at keras/src/layers/normalization/batch_normalization.py:221
self.beta_constraint = constraints.get(beta_constraint)
self.gamma_constraint = constraints.get(gamma_constraint)
self.supports_masking = True
self.renorm = renorm
if renorm:
renorm_clipping = renorm_clipping or {}
keys = ["rmax", "rmin", "dmax"]
if set(renorm_clipping) - set(keys):
raise ValueError(
"Received invalid keys for `renorm_clipping` argument: "
f"{renorm_clipping}. Supported values: {keys}."
)
rmax = renorm_clipping.get("rmax")
rmin = renorm_clipping.get("rmin")
dmax = renorm_clipping.get("dmax")
if rmax is not None and rmin is not None and rmax < rmin:
raise ValueError(
"rmax should be greater than rmin in the `renorm_clipping` "
"argument. Received: rmax={rmax}, rmin={rmin}."
)
if dmax is not None and dmax < 0:
raise ValueError(
"dmax should be non-negative in the `renorm_clipping` "
"""argument. Received: dmax={dmax}."""
)
self.renorm_clipping = renorm_clipping
self.renorm_momentum = renorm_momentum
self.gamma = None
self.beta = None
self.moving_mean = None
self.moving_variance = None
self._reduction_axes = None
View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/layers/normalization/batch_normalization.py:221 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/e3339c1d31880beb.
Report an issue: GitHub.