PR #18125: Dealing with the problem that tf.name_scope is not reflected #17538 #18353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #18125: Dealing with the problem that tf.name_scope is not reflected keras-team/tf-keras#269
Imported from GitHub PR #18125
Fixed the problem that tf.name_scope is ignored even if tf.keras.internal.apply_name_scope_on_model_declaration is used.
related issues
tf.name_scope
is ignored when constructing a model using the functional API tf-keras#269PS. Thanks to @slanzmich for finding this solution.
Copybara import of the project:
--
6ab4ccf by kenkoba [email protected]:
Format keras/engine/base_layer.py and _test.py
I use black --line-length 80 keras/engine/base_layer.py and _test.py
When applied to everything below keras, the difference became large and
confusing, so I restricted it.
--
dffd2ad by kenkoba [email protected]:
Reproduce an issue where tf.name_scope is ignored
ref: keras-team/tf-keras#269
--
e33503a by kenkoba [email protected]:
Use the name_scope with tf.get_current_name_scope
Using current_name_scope in self._name_scope() seemed to be difficult to
handle because it is a deep value managed by python's threading through
tf.internal.get_name_scope
--
3673996 by kenkoba [email protected]:
Rid of my bad habits
Merging this change closes #18125
FUTURE_COPYBARA_INTEGRATE_REVIEW=#18125 from DameNianch:refer-name_scope 3673996