keras-team/keras · error · NotImplementedError

Unknown `fill_mode` {fill_mode}. Expected of one {self._SUPP

Error message

Unknown `fill_mode` {fill_mode}. Expected of one {self._SUPPORTED_FILL_MODE}.

What it means

Error "Unknown `fill_mode` {fill_mode}. Expected of one {self._SUPPORTED_FILL_MODE}." thrown in keras-team/keras.

Source

Thrown at keras/src/layers/preprocessing/image_preprocessing/random_rotation.py:109

        self,
        factor,
        fill_mode="reflect",
        interpolation="bilinear",
        seed=None,
        fill_value=0.0,
        data_format=None,
        **kwargs,
    ):
        super().__init__(factor=factor, data_format=data_format, **kwargs)
        self.seed = seed
        self.generator = SeedGenerator(seed)
        self.fill_mode = fill_mode
        self.interpolation = interpolation
        self.fill_value = fill_value
        self.supports_jit = False

        if self.fill_mode not in self._SUPPORTED_FILL_MODE:
            raise NotImplementedError(
                f"Unknown `fill_mode` {fill_mode}. Expected of one "
                f"{self._SUPPORTED_FILL_MODE}."
            )
        if self.interpolation not in self._SUPPORTED_INTERPOLATION:
            raise NotImplementedError(
                f"Unknown `interpolation` {interpolation}. Expected of one "
                f"{self._SUPPORTED_INTERPOLATION}."
            )

    def _transform_images(self, images, transformation, interpolation):
        return self.backend.image.affine_transform(
            images=images,
            transform=transformation["rotation_matrix"],
            interpolation=interpolation,
            fill_mode=self.fill_mode,
            fill_value=self.fill_value,
            data_format=self.data_format,
        )

View on GitHub (pinned to 7a34a03db6)

When it happens

Trigger: Thrown at keras/src/layers/preprocessing/image_preprocessing/random_rotation.py:109 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/587e175ac1439963. Report an issue: GitHub.