Mila
Deep Neural Network Library
|
Abstract interface for model and module serialization. More...
Public Member Functions | |
virtual | ~ModelSerializer ()=default |
virtual bool | addData (const std::string &path, const void *data, size_t size)=0 |
Adds a memory buffer to the archive. | |
virtual bool | close ()=0 |
Closes the current archive. | |
virtual size_t | extractData (const std::string &path, void *data, size_t size)=0 |
Extracts data from the archive. | |
virtual bool | hasFile (const std::string &path) const =0 |
Checks if a file exists in the archive. | |
virtual bool | openForRead (const std::string &filename)=0 |
Opens an archive for reading. | |
virtual bool | openForWrite (const std::string &filename)=0 |
Opens an archive for writing. | |
Abstract interface for model and module serialization.
|
virtualdefault |
|
pure virtual |
Adds a memory buffer to the archive.
path | Path within the archive |
data | Pointer to the data |
size | Size of the data in bytes |
Implemented in Mila::Dnn::Serialization::ZipSerializer.
|
pure virtual |
Closes the current archive.
Implemented in Mila::Dnn::Serialization::ZipSerializer.
|
pure virtual |
Extracts data from the archive.
path | Path within the archive |
data | Pointer to the buffer where data should be stored |
size | Size of the buffer in bytes |
Implemented in Mila::Dnn::Serialization::ZipSerializer.
|
pure virtual |
Checks if a file exists in the archive.
path | Path within the archive |
Implemented in Mila::Dnn::Serialization::ZipSerializer.
|
pure virtual |
Opens an archive for reading.
filename | Path to the archive file |
Implemented in Mila::Dnn::Serialization::ZipSerializer.
|
pure virtual |
Opens an archive for writing.
filename | Path to the archive file |
Implemented in Mila::Dnn::Serialization::ZipSerializer.