mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/40718 Currently only constant except tensor must be inlined during serialization. Tensor are stored in the contant table. This patch generalizes this capability to any IValue. This is particularly useful for non ASCII string literal that cannot be inlined. Test Plan: Imported from OSS Differential Revision: D22298169 Pulled By: bzinodev fbshipit-source-id: 88cc59af9cc45e426ca8002175593b9e431f4bac
5 lines
97 B
Plaintext
5 lines
97 B
Plaintext
def forward(self,
|
|
x: Tensor,
|
|
y: Tensor) -> str:
|
|
return torch.add(self.a, CONSTANTS.c0)
|