Call `super().build(input_shape)` instead of `self.built = True` in all Keras layers.
Within `build()`, some Keras layers where calling `super().build(input_shape)` while some were calling `self.built = True`. This would result in a different config when serializing whereby layers doing `self.built = True` would not have a `build_config`. This change makes it consistent between all the layers as well as consistent with Keras 3. Note that some layers need to call `Layer.build(self, input_shape)` directly to bypass some class' `build()` but still populate the information for the `build_config`. PiperOrigin-RevId: 678454186
F
Fabien Hertschuh committed
126b855d3d511afdd11af1595c2117e686690bbc
Parent: ed3f017
Committed by A. Unique TensorFlower <gardener@tensorflow.org>
on 9/25/2024, 12:22:36 AM