{"record":{"id":"7d41025e05eba012","repo":"keras-team/keras","slug":"invalid-value-for-attribute-regularizer-expecte","errorCode":null,"errorMessage":"Invalid value for attribute `regularizer`. Expected a callable (such as a `keras.regularizers.Regularizer` instance) or `None`. Received: regularizer={value}","messagePattern":"Invalid value for attribute `regularizer`\\. Expected a callable \\(such as a `keras\\.regularizers\\.Regularizer` instance\\) or `None`\\. Received: regularizer=(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/common/variables.py","lineNumber":378,"sourceCode":"        return self._overwrite_with_gradient\n\n    @overwrite_with_gradient.setter\n    def overwrite_with_gradient(self, value):\n        if not isinstance(value, bool):\n            raise TypeError(\n                \"`overwrite_with_gradient` must be a boolean. \"\n                f\"Received: {value}\"\n            )\n        self._overwrite_with_gradient = value\n\n    @property\n    def regularizer(self):\n        return self._regularizer\n\n    @regularizer.setter\n    def regularizer(self, value):\n        if value is not None and not callable(value):\n            raise ValueError(\n                \"Invalid value for attribute `regularizer`. Expected a \"\n                \"callable (such as a `keras.regularizers.Regularizer` \"\n                f\"instance) or `None`. Received: regularizer={value}\"\n            )\n        self._regularizer = value\n\n    @property\n    def constraint(self):\n        return self._constraint\n\n    @constraint.setter\n    def constraint(self, value):\n        if value is not None and not callable(value):\n            raise ValueError(\n                \"Invalid value for attribute `constraint`. Expected a \"\n                \"callable (such as a `keras.constraints.Constraint` instance) \"\n                f\"or `None`. Received: constraint={value}\"\n            )","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/common/variables.py#L360-L396","documentation":"Error \"Invalid value for attribute `regularizer`. Expected a callable (such as a `keras.regularizers.Regularizer` instance) or `None`. Received: regularizer={value}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/common/variables.py:378 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"}