forked from torch/torch7
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added torch.[de]serialize{To/From}Storage to File.lua.
These match the previous [de]serialize functions, but return a torch.CharStorage instead of a Lua string. This can be used to prevent hitting the LuaJIT 2GB limit for very large objects, because the CharStorage is allocated on the C side (not counting towards this limit) but the Lua string will count towards this limit. This modification fixed a repeatable OOM crash I found for trying to serialize certain large models.
- Loading branch information
1 parent
d652209
commit 3a96d15
Showing
2 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters