Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tensorflow_text/python/keras/layers/todense.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,8 @@ def get_config(self):
'shape': self._shape,
}
base_config = super(ToDense, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
# Plain dict-merge instead of building two intermediate lists via
# list(...) + list(...) just to re-wrap them with dict(); same result
# (config's keys still take precedence on any overlap), no throwaway
# list allocations.
return {**base_config, **config}