Closed PetrochukM closed 4 years ago
Look into how pickle works to implement a method for getting every tensor: https://github.com/PetrochukM/PyTorch-NLP/blob/be1a08edbd898d30273b7062c9c16fcf7f788787/torchnlp/utils.py#L35
pickle
Could we replicate torch.loads ability to move all tensors in an object between devices? torch.load uses pickle to do that.
torch.load
Look into how
pickle
works to implement a method for getting every tensor: https://github.com/PetrochukM/PyTorch-NLP/blob/be1a08edbd898d30273b7062c9c16fcf7f788787/torchnlp/utils.py#L35Could we replicate
torch.load
s ability to move all tensors in an object between devices?torch.load
usespickle
to do that.