MCPcopy Create free account
hub / github.com/pytorch/tutorials / unpack

Function unpack

intermediate_source/autograd_saved_tensors_hooks_tutorial.py:232–233  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

230 return len(storage) - 1
231
232def unpack(x):
233 return storage[x]
234
235x = torch.randn(5, requires_grad=True)
236with torch.autograd.graph.saved_tensors_hooks(pack, unpack):

Callers

nothing calls this directly

Calls 1

fFunction · 0.70

Tested by

no test coverage detected