torch.fx.experimental.unification.more.reify_object
-
torch.fx.experimental.unification.more.reify_object(o, s)[исходный код] -
Приведение объекта Python к конкретному виду с помощью подстановки >>> class Foo(object): … def __init__(self, a, b): … self.a = a … self.b = b … … def __str__(self): … return “Foo(%s, %s)” % (str(self.a), str(self.b)) >>> x = var(“x”) >>> f = Foo(1, x) >>> print(f) Foo(1, ~x) >>> print(reify_object(f, {x: 2})) Foo(1, 2)
- Тип возвращаемого значения:
© 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.more.reify_object.html