{"record":{"id":"0871b744fd2ef668","repo":"keras-team/keras","slug":"invalid-type-for-argument-axes-it-should-be-a-l","errorCode":null,"errorMessage":"Invalid type for argument `axes`: it should be a list or an int. Received: axes={axes}","messagePattern":"Invalid type for argument `axes`: it should be a list or an int\\. Received: axes=(.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"keras/src/layers/merging/dot.py","lineNumber":246,"sourceCode":"            corresponding to the desired axis from the first input and the\n            desired axis from the second input, respectively. Note that the\n            size of the two selected axes must match, and that\n            axis `0` (the batch axis) cannot be included.\n        normalize: Whether to L2-normalize samples along the dot product axis\n            before taking the dot product. If set to `True`, then\n            the output of the dot product is the cosine proximity\n            between the two samples.\n        **kwargs: Standard layer keyword arguments.\n\n    Returns:\n        A tensor, the dot product of the samples from the inputs.\n    \"\"\"\n\n    def __init__(self, axes, normalize=False, **kwargs):\n        super().__init__(**kwargs)\n        if not isinstance(axes, int):\n            if not isinstance(axes, (list, tuple)):\n                raise TypeError(\n                    f\"Invalid type for argument `axes`: it should be \"\n                    f\"a list or an int. Received: axes={axes}\"\n                )\n            if len(axes) != 2:\n                raise ValueError(\n                    f\"Invalid format for argument `axes`: it should contain \"\n                    f\"two elements. Received: axes={axes}\"\n                )\n            if not isinstance(axes[0], int) or not isinstance(axes[1], int):\n                raise ValueError(\n                    f\"Invalid format for argument `axes`: list elements should \"\n                    f\"be integers. Received: axes={axes}\"\n                )\n        self.axes = axes\n        self.normalize = normalize\n        self.supports_masking = True\n        self._reshape_required = False\n","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/layers/merging/dot.py#L228-L264","documentation":"Error \"Invalid type for argument `axes`: it should be a list or an int. Received: axes={axes}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/layers/merging/dot.py:246 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"}