KEMBAR78
Allow map_location in torch.load to be a string by apaszke · Pull Request #4203 · pytorch/pytorch · GitHub
Skip to content

Conversation

@apaszke
Copy link
Contributor

@apaszke apaszke commented Dec 15, 2017

Simplify loading models that are placed on a single device. To enforce all tensors to be loaded on the CPU you can do this:

torch.load('file.pt', map_location='cpu')

@apaszke apaszke requested a review from soumith December 15, 2017 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants