{"record":{"id":"10148de7c612e78a","repo":"keras-team/keras","slug":"convlstm-layers-only-support-static-input-shapes-f","errorCode":null,"errorMessage":"ConvLSTM layers only support static input shapes for the spatial dimension. Received invalid input shape: input_shape={inputs_shape}","messagePattern":"ConvLSTM layers only support static input shapes for the spatial dimension\\. Received invalid input shape: input_shape=(.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/layers/rnn/conv_lstm.py","lineNumber":172,"sourceCode":"        self.kernel_constraint = constraints.get(kernel_constraint)\n        self.recurrent_constraint = constraints.get(recurrent_constraint)\n        self.bias_constraint = constraints.get(bias_constraint)\n\n        self.dropout = min(1.0, max(0.0, dropout))\n        self.recurrent_dropout = min(1.0, max(0.0, recurrent_dropout))\n        self.dropout_mask_count = 4\n        self.input_spec = InputSpec(ndim=rank + 2)\n        self.state_size = -1  # Custom, defined in methods\n\n    def build(self, inputs_shape, states_shape=None):\n        if self.data_format == \"channels_first\":\n            channel_axis = 1\n            self.spatial_dims = inputs_shape[2:]\n        else:\n            channel_axis = -1\n            self.spatial_dims = inputs_shape[1:-1]\n        if None in self.spatial_dims:\n            raise ValueError(\n                \"ConvLSTM layers only support static \"\n                \"input shapes for the spatial dimension. \"\n                f\"Received invalid input shape: input_shape={inputs_shape}\"\n            )\n        if inputs_shape[channel_axis] is None:\n            raise ValueError(\n                \"The channel dimension of the inputs (last axis) should be \"\n                \"defined. Found None. Full input shape received: \"\n                f\"input_shape={inputs_shape}\"\n            )\n        self.input_spec = InputSpec(\n            ndim=self.rank + 3, shape=(None,) + inputs_shape[1:]\n        )\n\n        input_dim = inputs_shape[channel_axis]\n        self.input_dim = input_dim\n        self.kernel_shape = self.kernel_size + (input_dim, self.filters * 4)\n        recurrent_kernel_shape = self.kernel_size + (","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/layers/rnn/conv_lstm.py#L154-L190","documentation":"Error \"ConvLSTM layers only support static input shapes for the spatial dimension. Received invalid input shape: input_shape={inputs_shape}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/layers/rnn/conv_lstm.py:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}