OCR Project
Loading...
Searching...
No Matches
model.h
Go to the documentation of this file.
1
13
14#ifndef MODEL_H
15#define MODEL_H
16
17#include "cnn.h"
18#include <stdint.h>
19
21#define MODEL_MAGIC "OCRC"
22
24#define MODEL_VERSION ((uint32_t)1)
25
35int model_save(const CNN *net, const char *path);
36
47int model_load(CNN *net, const char *path);
48
61int model_find_latest(const char *dir, char *out_path, size_t out_len);
62
63#endif /* MODEL_H */
Convolutional Neural Network for A–Z character recognition.
int model_load(CNN *net, const char *path)
Load CNN weights from a binary file into net.
Definition model.c:55
int model_find_latest(const char *dir, char *out_path, size_t out_len)
Find the most recently modified .bin file inside a directory.
Definition model.c:101
int model_save(const CNN *net, const char *path)
Save the weights of a trained CNN to a binary file.
Definition model.c:17
Full CNN state: weights, gradients, momentum buffers, activations.
Definition cnn.h:137