Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow map_location in torch.load to be a string#4203

Merged
apaszke merged 1 commit into
masterfrom
serialization_tag
Dec 16, 2017
Merged

Allow map_location in torch.load to be a string#4203
apaszke merged 1 commit into
masterfrom
serialization_tag

Conversation

@apaszke
Copy link
Copy Markdown
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