Skip to content

Optimize config merging in get_config method - #1554

Open
MaddipatlaChetan24 wants to merge 1 commit into
tensorflow:masterfrom
MaddipatlaChetan24:patch-1
Open

MaddipatlaChetan24 wants to merge 1 commit into
tensorflow:masterfrom
MaddipatlaChetan24:patch-1

Conversation

@MaddipatlaChetan24

Copy link
Copy Markdown

Description

Simplifies ToDense.get_config() to merge base_config and config using a dict-unpacking merge ({**base_config, **config}) instead of converting both to lists, concatenating them, and re-wrapping with dict(...). Verified behaviorally identical, including on the key-overlap case (config's values still take precedence over base_config's, matching the original's + ordering) — same output dict either way, just without the two throwaway list allocations. No other changes.

Scope

Patch: Cleanup

Refactor get_config method to use dict unpacking for merging.
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