Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
nn_model_test.c File Reference
#include "common/nn_model.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
+ Include dependency graph for nn_model_test.c:

Go to the source code of this file.

Functions

static double max_abs_diff (const float *a, const float *b, size_t count)
 
static float * read_f32 (const char *dir, const char *name, size_t count)
 
int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Todo:
: test if file with replaced ext exists
Todo:
: add a callback to set the bpp without going through the config
Todo:
: have a parameter in command line to get the export presets

Definition at line 71 of file nn_model_test.c.

References d, dt_nn_bin_planes(), dt_nn_model_alignment(), dt_nn_model_bin(), dt_nn_model_coarse_in_channels(), dt_nn_model_coarse_out_channels(), dt_nn_model_free(), dt_nn_model_in_channels(), dt_nn_model_load(), dt_nn_model_out_channels(), dt_nn_unet_apply(), dt_nn_unet_apply_stage(), dt_nn_unet_scratch_bytes(), dt_nn_upsample_nearest(), i, L, max_abs_diff(), model, n, out, read_f32(), and rgb.

◆ max_abs_diff()

static double max_abs_diff ( const float *  a,
const float *  b,
size_t  count 
)
static

Definition at line 38 of file nn_model_test.c.

References d, i, and L.

Referenced by main().

◆ read_f32()

static float * read_f32 ( const char *  dir,
const char *  name,
size_t  count 
)
static

Definition at line 49 of file nn_model_test.c.

References f, L, and name.

Referenced by main().