WolfWolf
Home
Get Started
Examples
GitHub
Home
Get Started
Examples
GitHub
  • Installation

    • Build from Source
  • Examples

    • Mnist Classifier
    • Saving and Loading Models

Saving and Loading Models

Wolf has made it easy to save and load models and Tensors to a file.

Saving

Sequential model(Linear(500, 100), ReLU(), Linear(100, 1));
model.save("output/model");

This will save the model layers as well as its weights to a binary file. You are free to specify the file extension however you like.

Loading

auto model = Sequential::load("output/model");

There are also save_tensor and load_tensor which works on Tensor objects the same way.

Edit this page
Last Updated:: 11/19/25, 10:34 AM
Contributors: warg
Prev
Mnist Classifier

Made with ❤️ for C++