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

PR #18125: Dealing with the problem that tf.name_scope is not reflected #17538 #18353

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link

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

PS. 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

…ed #17538

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
- https://github.com/keras-team/keras/issues/17538
- tensorflow/tensorflow#27298

PS. 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: https://github.com/keras-team/keras/issues/17538

--
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
PiperOrigin-RevId: 558099164
@google-cla
Copy link

google-cla bot commented Aug 18, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service copybara-service bot closed this Sep 6, 2023
@copybara-service copybara-service bot deleted the test_558099164 branch September 6, 2023 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant