keras-team/keras · error · ValueError

use_cudnn=True was specified, but cuDNN is not supported for

Error message

use_cudnn=True was specified, but cuDNN is not supported for this layer configuration with this backend. Pass use_cudnn='auto' to fallback to a non-cuDNN implementation.

What it means

Error "use_cudnn=True was specified, but cuDNN is not supported for this layer configuration with this backend. Pass use_cudnn='auto' to fallback to a non-cuDNN implementation." thrown in keras-team/keras.

Source

Thrown at keras/src/layers/rnn/gru.py:590

                        kernel=self.cell.kernel,
                        recurrent_kernel=self.cell.recurrent_kernel,
                        bias=self.cell.bias,
                        activation=self.cell.activation,
                        recurrent_activation=self.cell.recurrent_activation,
                        return_sequences=self.return_sequences,
                        go_backwards=self.go_backwards,
                        unroll=self.unroll,
                        reset_after=self.cell.reset_after,
                    )
                    # We disable jit_compile for the model in this case,
                    # since cuDNN ops aren't XLA compatible.
                    if backend.backend() == "tensorflow":
                        self.supports_jit = False
                    return out
                except NotImplementedError:
                    pass
        if self.use_cudnn is True:
            raise ValueError(
                "use_cudnn=True was specified, "
                "but cuDNN is not supported for this layer configuration "
                "with this backend. Pass use_cudnn='auto' to fallback "
                "to a non-cuDNN implementation."
            )
        return super().inner_loop(
            sequences, initial_state, mask=mask, training=training
        )

    def call(self, sequences, initial_state=None, mask=None, training=False):
        return super().call(
            sequences, mask=mask, training=training, initial_state=initial_state
        )

    @property
    def units(self):
        return self.cell.units

View on GitHub (pinned to 7a34a03db6)

When it happens

Trigger: Thrown at keras/src/layers/rnn/gru.py:590 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/7f1da23f66284151. Report an issue: GitHub.