Skip to content

Instantly share code, notes, and snippets.

@aidiary
Last active Nov 27, 2019
Embed
What would you like to do?
[PyTorch] GPUの重みをCPUでロード
load_weights = torch.load(load_path, map_location={'cuda:0': 'cpu'})
net.load_state_dict(load_weights)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment