forked from ambipomyan/CNN_OpenMP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpers_main.h
21 lines (12 loc) · 1.28 KB
/
helpers_main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "cnn_in_one_page.h"
#include "conv.h"
#include "connect.h"
void forward_convolutional_layer(LAYER *layer_, LAYER *layer, float *input, float *output, int Op, int dev_id, int num_dev); // op: 1 for reLU, 0 for no activation
void forward_pooling_layer( LAYER *layer_, LAYER *layer, float *input, float *output, int Op, int dev_id, int num_dev); // Op: 1 for maxpooling
void forward_connected_layer( LAYER *layer_, LAYER *layer, float *input, float *output, int Op, int dev_id, int num_dev); // Op: 1 for reLU, 0 for no activation
void forward_softmax_layer( LAYER *layer_, LAYER *layer, float *input, float *output, int dev_id, int num_dev);
float compute_loss_function(LAYER *layer, float *network_truth, int training_volume, int training_epoch);
void backward_softmax_layer( LAYER *layer, LAYER *layer_, float *delta_in, float *delta_out, int dev_id, int num_dev);
void backward_connected_layer( LAYER *layer, LAYER *layer_, float *delta_in, float *delta_out, int Op, int dev_id, int num_dev);
void backward_pooling_layer( LAYER *layer, LAYER *layer_, float *delta_in, float *delta_out, int Op, int dev_id, int num_dev);
void backward_convolutional_layer(LAYER *layer, LAYER *layer_, float *delta_in, float *delta_out, int Op, int dev_id, int num_dev);