Fix GRU, Add LSTM

This commit is contained in:
Yao Lu
2017-06-06 16:50:19 -07:00
parent d528cbdb7b
commit e9f3b79776
8 changed files with 696 additions and 327 deletions

View File

@ -63,6 +63,7 @@ typedef enum {
ACTIVE,
RNN,
GRU,
LSTM,
CRNN,
BATCHNORM,
NETWORK,
@ -185,7 +186,7 @@ struct layer{
float * forgot_state;
float * forgot_delta;
float * state_delta;
float * concat;
float * concat_delta;
@ -251,6 +252,21 @@ struct layer{
struct layer *input_h_layer;
struct layer *state_h_layer;
struct layer *wz;
struct layer *uz;
struct layer *wr;
struct layer *ur;
struct layer *wh;
struct layer *uh;
struct layer *uo;
struct layer *wo;
struct layer *uf;
struct layer *wf;
struct layer *ui;
struct layer *wi;
struct layer *ug;
struct layer *wg;
tree *softmax_tree;
@ -263,6 +279,21 @@ struct layer{
float *r_gpu;
float *h_gpu;
float *temp_gpu;
float *temp2_gpu;
float *temp3_gpu;
float *dh_gpu;
float *hh_gpu;
float *prev_cell_gpu;
float *cell_gpu;
float *f_gpu;
float *i_gpu;
float *g_gpu;
float *o_gpu;
float *c_gpu;
float *dc_gpu;
float *m_gpu;
float *v_gpu;
float *bias_m_gpu;