-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpool_layer.h
33 lines (26 loc) · 938 Bytes
/
pool_layer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __POOL_LAYER_H
#define __POOL_LAYER_H
#include"cnn.h"
struct pool_layer{
//与上一层相连
struct data_box *x;
struct data_box *dx;
//与下一层相连
struct data_box *out;
struct data_box *dout;
void (*forward_pass)(struct layer *,int);
void (*backward_pass)(struct layer *);
void (*update)(struct CNN *,struct layer *);
void (*load_weight)(struct layer *l,double *p);
void (*pack_dweight)(struct layer *l,double *p);
int weight_size;
int pool_h,pool_w;
int *index;
};
void pool_layer_init(struct layer **init_layer,struct data_box **com_p,struct data_box **dcom_p,int pool_h,int pool_w);
void pool_layer_forward_pass(struct layer *,int);
void pool_layer_backward_pass(struct layer *);
void pool_layer_update(struct CNN *,struct layer *);
void pool_layer_load_weight(struct layer *l,double *p);
void pool_layer_pack_dweight(struct layer *l,double *p);
#endif // __POOL_LAYER_H