You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix a bug impacting serialization order for call methods with mutiple inputs.
This bug made `get_config/from_config` and `to_json/from_json` not idempotent for layers that take multiple inputs in their `call` method.
When the functional model is constructed and the multiple inputs are passed as positional arguments, the `Node` object has multiple `call_args` in a list.
However, by design, serialization only treats the first argument and positional and serializes all the other arguments as keyword arguments. Upon deserialization, the extra arguments are created as keyword arguments. Their order was modified by `tf.nest.flatten`, which sorts dicts by key.
This change preserves the order of keyword arguments, regardless of keys.
Fixes#795
PiperOrigin-RevId: 686197321
0 commit comments