MCPcopy Create free account
hub / github.com/pytorch/pytorch / SerializationInterop

Class SerializationInterop

test/cpp/jit/tests_setup.py:42–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41
42class SerializationInterop(FileSetup):
43 path = 'ivalue.pt'
44
45 def setup(self):
46 ones = torch.ones(2, 2)
47 twos = torch.ones(3, 5) * 2
48
49 value = (ones, twos)
50
51 torch.save(value, self.path, _use_new_zipfile_serialization=True)
52
53
54# See testTorchSaveError in test/cpp/jit/tests.h for usage

Callers 1

tests_setup.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…