FlexNN 1
Fully connected neural network built from scratch with flexible n-layer design and multiple activations.
Loading...
Searching...
No Matches
ModelIO.hpp File Reference

Flat binary ModelIO for FlexNN โ€” exportModel / importModel. More...

#include <cstdint>
#include <string>
#include "FlexNN.h"
Include dependency graph for ModelIO.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FlexNN::Status
 Result of export/import. More...
 
struct  FlexNN::ExportOptions
 Options for export (currently version). More...
 

Namespaces

namespace  FlexNN
 Namespace for the FlexNN neural network library.
 

Functions

Status FlexNN::exportModel (const NeuralNetwork &net, const std::string &path, ExportOptions opts={})
 Export a trained NeuralNetwork to flat binary model.bin.
 
Status FlexNN::importModel (NeuralNetwork &net, const std::string &path)
 Import a flat binary model.bin into a NeuralNetwork.
 

Detailed Description

Flat binary ModelIO for FlexNN โ€” exportModel / importModel.

Implements the 20B main header + 52B per-layer header + blobs + file CRC contract from LLD_FLEXNN ยง7 / Appendix A. FlexNN writes, any runtime reads. No TinyForge dependency โ€” just Layers::Layer variant via std::visit.

All integers little-endian, floats IEEE-754 binary32 little-endian, no padding, CRC-32 IEEE (poly 0xEDB88320, init 0xFFFFFFFF, xorout 0xFFFFFFFF).