2013-11-04 23:11:01 +04:00
|
|
|
// Oh boy, why am I about to do this....
|
|
|
|
#ifndef NETWORK_H
|
|
|
|
#define NETWORK_H
|
|
|
|
|
|
|
|
#include "image.h"
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
CONVOLUTIONAL,
|
|
|
|
CONNECTED,
|
|
|
|
MAXPOOL
|
|
|
|
} LAYER_TYPE;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int n;
|
|
|
|
void **layers;
|
|
|
|
LAYER_TYPE *types;
|
|
|
|
} network;
|
|
|
|
|
2013-11-07 04:09:41 +04:00
|
|
|
network make_network(int n);
|
2013-11-04 23:11:01 +04:00
|
|
|
void run_network(image input, network net);
|
2013-11-06 22:37:37 +04:00
|
|
|
void learn_network(image input, network net);
|
|
|
|
void update_network(network net, double step);
|
2013-11-07 04:09:41 +04:00
|
|
|
double *get_network_output(network net);
|
|
|
|
double *get_network_output_layer(network net, int i);
|
|
|
|
int get_network_output_size_layer(network net, int i);
|
2013-11-04 23:11:01 +04:00
|
|
|
image get_network_image(network net);
|
2013-11-07 04:09:41 +04:00
|
|
|
image get_network_image_layer(network net, int i);
|
2013-11-04 23:11:01 +04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|