keras-team/keras · error · ValueError

Rank convolutions are not currently implemented. Received…

Error message

Rank {rank} convolutions are not currently implemented. Received: rank={rank}

What it means

Raised by ConvLSTM (its __init__ after assigning self.rank) when the requested convolution rank exceeds 3. Keras implements ConvLSTM1D/2D/3D only; a rank of 4 or higher has no convolution implementation, so it is rejected immediately.

Solutions

  1. Use rank 1, 2, or 3 (e.g. via ConvLSTM2D/ConvLSTM3D classes)
  2. For 4D+ spatiotemporal data, reshape or split the input so the convolution rank is at most 3
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at keras/src/layers/rnn/conv_lstm.py:117 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/cc7b64c46803d5ec. Report an issue: GitHub.

Appendix: source

Thrown at keras/src/layers/rnn/conv_lstm.py:117

        bias_initializer="zeros",
        unit_forget_bias=True,
        kernel_regularizer=None,
        recurrent_regularizer=None,
        bias_regularizer=None,
        kernel_constraint=None,
        recurrent_constraint=None,
        bias_constraint=None,
        dropout=0.0,
        recurrent_dropout=0.0,
        seed=None,
        **kwargs,
    ):
        super().__init__(**kwargs)
        self.seed = seed
        self.seed_generator = backend.random.SeedGenerator(seed=seed)
        self.rank = rank
        if self.rank > 3:
            raise ValueError(
                f"Rank {rank} convolutions are not currently "
                f"implemented. Received: rank={rank}"
            )
        self.filters = filters
        self.kernel_size = argument_validation.standardize_tuple(
            kernel_size, self.rank, "kernel_size"
        )
        self.strides = argument_validation.standardize_tuple(
            strides, self.rank, "strides", allow_zero=True
        )
        self.padding = argument_validation.standardize_padding(padding)
        self.data_format = backend.standardize_data_format(data_format)
        self.dilation_rate = argument_validation.standardize_tuple(
            dilation_rate, self.rank, "dilation_rate"
        )
        if max(self.strides) > 1 and max(self.dilation_rate) > 1:
            raise ValueError(
                "Specifying `strides > 1` is not compatible with "

View on GitHub (pinned to 7a34a03db6)