Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/tutorials
/ pack
Function
pack
intermediate_source/autograd_saved_tensors_hooks_tutorial.py:228–230 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
226
storage = []
227
228
def
pack(x):
229
storage.append(x)
230
return
len(storage) - 1
231
232
def
unpack(x):
233
return
storage[x]
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected