torch.fx.experimental.unification.unification_tools.itemmap
-
torch.fx.experimental.unification.unification_tools.itemmap(func, d, factory=<class 'dict'>)[исходный код] -
Применяет функцию к элементам словаря
>>> accountids = {"Alice": 10, "Bob": 20} >>> itemmap(reversed, accountids) {10: "Alice", 20: "Bob"}См. также
keymap valmap
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.fx.experimental.unification.unification_tools.itemmap.html