When I read the docs about loading data using callable in here, storage
and loc
mysteriously appears in the code example (the examples are pasted below).
# Load all tensors onto the CPU, using a function
>>> torch.load('tensors.pt', map_location=lambda storage, loc: storage)
# Load all tensors onto GPU 1
>>> torch.load('tensors.pt', map_location=lambda storage, loc: storage.cuda(1))
Since I could execute the code snippet without problem, I am wondering if storage
or loc
are something pre-defined and I happened to miss them.
Could someone help me, thank you in advance.