Rate this Page

torch.fx.experimental.unification.unification_tools.merge#

torch.fx.experimental.unification.unification_tools.merge(*dicts, **kwargs)[source]#

Merge a collection of dictionaries

>>> merge({1: "one"}, {2: "two"})
{1: 'one', 2: 'two'}

Later dictionaries have precedence

>>> merge({1: 2, 3: 4}, {3: 3, 4: 4})
{1: 2, 3: 3, 4: 4}

See also

merge_with