Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
james77777778 committed Feb 7, 2025
1 parent 4cfc477 commit fc00636
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions keras/src/layers/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@ def _post_init(self):
The metaclass pattern ensures that this function runs after the
`__init__` of a subclassed layer.
Essentially, we automatically determine `self.built` by checking whether
`self.build` is the default implementation. If `build` is not overridden
by the subclass, `self.built` is set to `True`.
Essentially, we automatically determine `self.built` by:
- Checking if `build` is not overridden by the subclass.
- Ensuring there is no unbuilt state.
"""
if utils.is_default(self.build):
if utils.is_default(self.build) and not might_have_unbuilt_state(self):
self.built = True
self._post_build()
self._lock_state()
Expand Down

0 comments on commit fc00636

Please sign in to comment.