Rate this Page

torch.fx.experimental.unification.unification_tools.itemmap#

torch.fx.experimental.unification.unification_tools.itemmap(func, d, factory=<class 'dict'>)[source]#

Apply function to items of dictionary

>>> accountids = {"Alice": 10, "Bob": 20}
>>> itemmap(reversed, accountids)  
{10: "Alice", 20: "Bob"}

See also

keymap valmap