| | |
| | | #ifndef DROPOUT_LAYER_H |
| | | #define DROPOUT_LAYER_H |
| | | #include "opencl.h" |
| | | |
| | | typedef struct{ |
| | | int batch; |
| | |
| | | float probability; |
| | | float scale; |
| | | float *rand; |
| | | float *output; |
| | | #ifdef GPU |
| | | cl_mem rand_cl; |
| | | float * rand_gpu; |
| | | float * output_gpu; |
| | | #endif |
| | | } dropout_layer; |
| | | |
| | |
| | | |
| | | void forward_dropout_layer(dropout_layer layer, float *input); |
| | | void backward_dropout_layer(dropout_layer layer, float *delta); |
| | | void resize_dropout_layer(dropout_layer *layer, int inputs); |
| | | |
| | | #ifdef GPU |
| | | void forward_dropout_layer_gpu(dropout_layer layer, cl_mem input); |
| | | void backward_dropout_layer_gpu(dropout_layer layer, cl_mem delta); |
| | | void forward_dropout_layer_gpu(dropout_layer layer, float * input); |
| | | void backward_dropout_layer_gpu(dropout_layer layer, float * delta); |
| | | |
| | | #endif |
| | | #endif |