Torch7 Serialization

来源:互联网 发布:淘宝网有解封dnf的吗 编辑:程序博客网 时间:2024/04/28 11:53

LINK: https://github.com/torch/torch7/blob/master/doc/serialization.md

Torch provides 4 high-level methods of serialize/deserialize arbitrary Lua/Torch objects. These functions are just abstractions over the File object, and were created for convenience (these are very common routines).

The first two functions are useful to serialize/deserialize data to/from files:

torch.save(filename, object [, format])[object] torch.load(filename [, format])

The format can be set to ascii or binary (default is binary).

The next two functions are useful to serialize/deserialize data to/from strings:

[str] torch.serialize(object)[object] torch.deserialize(str)
0 0
原创粉丝点击