keras-team/keras · error · ValueError

Unrecognized keyword arguments passed to {self.__class__.__n

Error message

Unrecognized keyword arguments passed to {self.__class__.__name__}: {kwargs}

What it means

Error "Unrecognized keyword arguments passed to {self.__class__.__name__}: {kwargs}" thrown in keras-team/keras.

Source

Thrown at keras/src/models/model.py:569

        config = Int8QuantizationConfig(
            weight_quantizer=AbsMaxQuantizer(
                axis=0,
                value_range=(-127, 127)
            ),
            activation_quantizer=AbsMaxQuantizer(
                axis=-1,
                value_range=(-127, 127)
            ),
        )

        # Quantize with custom config
        model.quantize(config=config)
        ```
        """
        # Validate inputs.
        type_check = kwargs.pop("type_check", True)
        if kwargs:
            raise ValueError(
                "Unrecognized keyword arguments "
                f"passed to {self.__class__.__name__}: {kwargs}"
            )

        if filters is not None:
            if not isinstance(filters, (str, Callable, list, tuple)):
                raise ValueError(
                    "The `filters` argument must be a regex string, a list of "
                    "regex strings, or a callable. Received: "
                    f"{type(filters)}"
                )

        # `mode` and `config` arrive here already resolved to a concrete mode
        # string and `QuantizationConfig`, because `Layer.__new__` wraps
        # `quantize` with `quantize_wrapper`, which calls
        # `validate_and_resolve_config`.

        # For structure-aware modes (`gptq`/`awq`), resolve and validate the

View on GitHub (pinned to 7a34a03db6)

When it happens

Trigger: Thrown at keras/src/models/model.py:569 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/4a7493a247d47a42. Report an issue: GitHub.