Skip to content

add map_location argument to torch.load calls#195

Open
ceferisbarov wants to merge 1 commit into
bowang-lab:mainfrom
ceferisbarov:map_location
Open

add map_location argument to torch.load calls#195
ceferisbarov wants to merge 1 commit into
bowang-lab:mainfrom
ceferisbarov:map_location

Conversation

@ceferisbarov

Copy link
Copy Markdown

torch.load(model_file) does not work if the device is set to CPU, so I replaced all of these calls with torch.load(model_file, map_location=device) which is more device-agnostic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant