2014-08-08 23:04:15 +04:00
|
|
|
#ifndef DROPOUT_LAYER_H
|
|
|
|
#define DROPOUT_LAYER_H
|
2015-03-12 08:20:15 +03:00
|
|
|
#include "params.h"
|
2014-08-08 23:04:15 +04:00
|
|
|
|
|
|
|
typedef struct{
|
|
|
|
int batch;
|
|
|
|
int inputs;
|
|
|
|
float probability;
|
2014-12-13 23:01:21 +03:00
|
|
|
float scale;
|
2014-11-19 00:51:04 +03:00
|
|
|
float *rand;
|
2014-12-13 23:01:21 +03:00
|
|
|
#ifdef GPU
|
2015-01-23 03:38:24 +03:00
|
|
|
float * rand_gpu;
|
2014-11-19 00:51:04 +03:00
|
|
|
#endif
|
2014-08-08 23:04:15 +04:00
|
|
|
} dropout_layer;
|
|
|
|
|
|
|
|
dropout_layer *make_dropout_layer(int batch, int inputs, float probability);
|
|
|
|
|
2015-03-12 08:20:15 +03:00
|
|
|
void forward_dropout_layer(dropout_layer layer, network_state state);
|
|
|
|
void backward_dropout_layer(dropout_layer layer, network_state state);
|
2015-02-11 06:41:03 +03:00
|
|
|
void resize_dropout_layer(dropout_layer *layer, int inputs);
|
2014-12-13 23:01:21 +03:00
|
|
|
|
|
|
|
#ifdef GPU
|
2015-03-12 08:20:15 +03:00
|
|
|
void forward_dropout_layer_gpu(dropout_layer layer, network_state state);
|
|
|
|
void backward_dropout_layer_gpu(dropout_layer layer, network_state state);
|
2014-08-08 23:04:15 +04:00
|
|
|
|
|
|
|
#endif
|
2014-11-19 00:51:04 +03:00
|
|
|
#endif
|