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

Slightly more defensive handling of type for backbone #1703

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

mattdangerw
Copy link
Member

We have some internal customers doing some weird legacy stuff with backbones.

We have some internal customers doing some weird legacy stuff
with backbones.
@@ -133,6 +133,9 @@ def get_config(self):
policy_map[layer.path] = layer.dtype_policy
if len(policy_map) > 0:
config.update({"dtype": policy_map})
# Before Keras 3.2, there is no `keras.dtype_policies.get`.
except AttributeError:
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering why we don't handle this case like the first one using keras.DTypePolicy(dtype).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, I just noticed they are completely different cases!

@mattdangerw mattdangerw merged commit b6877df into keras-team:master Jul 20, 2024
11 checks passed
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.

2 participants