Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call super().build(input_shape) instead of self.built = True in all Keras layers. #800

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant