Public Member Functions | |
| OutputArchive () | |
Default-constructs the OutputArchive. | |
| OutputArchive (OutputArchive &&)=default | |
| OutputArchive & | operator= (OutputArchive &&)=default |
| OutputArchive (OutputArchive &)=delete | |
| OutputArchive & | operator= (OutputArchive &)=delete |
| void | write (const std::string &key, const Tensor &tensor, bool is_buffer=false) |
Writes a (key, tensor) pair to the OutputArchive, and marks it as being or not being a buffer (non-differentiable tensor). More... | |
| void | write (const std::string &key, OutputArchive &nested_archive) |
Writes a nested OutputArchive under the given key to this OutputArchive. More... | |
| void | save_to (const std::string &filename) |
Saves the OutputArchive into a serialized representation in a file at filename. More... | |
| void | save_to (std::ostream &stream) |
Saves the OutputArchive into a serialized representation into the given stream. More... | |
| template<typename... Ts> | |
| void | operator() (Ts &&...ts) |
Forwards all arguments to write(). More... | |
Definition at line 25 of file output-archive.h.
|
inline |
Forwards all arguments to write().
Useful for generic code that can be re-used for both OutputArchive and InputArchive (where operator() forwards to read()).
Definition at line 61 of file output-archive.h.
| void torch::serialize::OutputArchive::save_to | ( | const std::string & | filename | ) |
Saves the OutputArchive into a serialized representation in a file at filename.
Definition at line 33 of file output-archive.cpp.
| void torch::serialize::OutputArchive::save_to | ( | std::ostream & | stream | ) |
Saves the OutputArchive into a serialized representation into the given stream.
Definition at line 38 of file output-archive.cpp.
| void torch::serialize::OutputArchive::write | ( | const std::string & | key, |
| const Tensor & | tensor, | ||
| bool | is_buffer = false |
||
| ) |
Writes a (key, tensor) pair to the OutputArchive, and marks it as being or not being a buffer (non-differentiable tensor).
Definition at line 20 of file output-archive.cpp.
| void torch::serialize::OutputArchive::write | ( | const std::string & | key, |
| OutputArchive & | nested_archive | ||
| ) |
Writes a nested OutputArchive under the given key to this OutputArchive.
Definition at line 27 of file output-archive.cpp.
1.8.11