Definition at line 11 of file weightsfile.hpp.
◆ loadModelFromFile()
virtual bool dl::io::WeightsFileFormat::loadModelFromFile |
( |
dl::ModelBase & |
model, |
|
|
std::filesystem::path & |
path, |
|
|
bool |
mmap = true |
|
) |
| |
|
pure virtual |
Populates the model's weights and metainformation from the given file.
- Parameters
-
model | The model to load the information into. |
path | |
mmap | |
- Returns
- true iff the model was successfully loaded from the file.
◆ loadModelFromStream()
Populates the model's weights and metainformation from the provided stream.
This implementation does not assume the stream to be seekable. That is, it does not "jump around". Because of this, it may be more memory intensive than WeightsFileFormat::loadModelFromFile(dl::ModelBase&,std::filesystem::path&,bool), which can make use of that it knows that it reads from a file and can jump around and memory map it. Instead, this implementation provides more flexibility since the stream could for example be a dl::utils::URLStream.
- Parameters
-
model | The model to load the information into. |
stream | |
- Returns
- true iff the model was successfully loaded from the stream.
The documentation for this class was generated from the following file: