def _build_at_init(self):
        """Build the layer at `Layer.__init__`.

        We can only safely mark the layer as `built=True` in `Layer.__init__` if
        `build` is not overridden. Otherwise, it might cause the subclasses to
        ignore the user's `build`.
        """
        if utils.is_default(self.build):
            self.built = True
            self._post_build()
            self._lock_state()
Build the layer at `Layer.__init__`.

        We can only safely mark the layer as `built=True` in `Layer.__init__` if
        `build` is not overridden. Otherwise, it might cause the subclasses to
        ignore the user's `build`.
        
keras/src/layers/layer.py