tinn/Tinn.h
Gustav Louw 171bd195e9 update
2018-03-30 13:04:37 -07:00

26 lines
557 B
C

#pragma once
typedef struct
{
double* w; // Weights.
double* b; // Biases.
double* h; // Hidden layer.
double* o; // Output layer.
// Number of biases - always two - Tinn only supports a single hidden layer.
int nb;
int nips; // Number of inputs.
int nhid; // Number of hidden neurons.
int nops; // Number of outputs.
}
Tinn;
double xttrain(const Tinn, const double* in, const double* tg, double rate);
Tinn xtbuild(int nips, int nhid, int nops);
void xtfree(Tinn);
double* xpredict(const Tinn, const double* in);