{"record":{"id":"f79598dc39e7386c","repo":"keras-team/keras","slug":"invalid-value-received-for-argument-noise-shape-f79598","errorCode":null,"errorMessage":"Invalid value received for argument `noise_shape`. Expected an iterable of integers (e.g., a tuple or list). Received: noise_shape={noise_shape}","messagePattern":"Invalid value received for argument `noise_shape`\\. Expected an iterable of integers \\(e\\.g\\., a tuple or list\\)\\. Received: noise_shape=(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/layers/regularization/dropout.py","lineNumber":73,"sourceCode":"\n        self._build_at_init()\n\n    def _validate_noise_shape(self, noise_shape):\n        if noise_shape is None:\n            return None\n\n        if isinstance(noise_shape, str):\n            raise ValueError(\n                f\"Invalid value received for argument `noise_shape`. \"\n                f\"Expected a tuple or list of integers. \"\n                f\"Received: noise_shape={noise_shape}\"\n            )\n\n        if not isinstance(noise_shape, tuple):\n            try:\n                noise_shape = tuple(noise_shape)\n            except TypeError:\n                raise ValueError(\n                    f\"Invalid value received for argument `noise_shape`. \"\n                    f\"Expected an iterable of integers \"\n                    f\"(e.g., a tuple or list). \"\n                    f\"Received: noise_shape={noise_shape}\"\n                )\n\n        for i, dim in enumerate(noise_shape):\n            if dim is not None:\n                if not isinstance(dim, int):\n                    raise ValueError(\n                        f\"Invalid value received for argument `noise_shape`. \"\n                        f\"Expected all elements to be integers or None. \"\n                        f\"Received element at index {i}: {dim} \"\n                        f\"(type: {type(dim).__name__})\"\n                    )\n\n                if dim <= 0:\n                    raise ValueError(","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/layers/regularization/dropout.py#L55-L91","documentation":"Error \"Invalid value received for argument `noise_shape`. Expected an iterable of integers (e.g., a tuple or list). Received: noise_shape={noise_shape}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/layers/regularization/dropout.py:73 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"}