| | |
| | | if(id < size) input[id] = (rand[id] < prob) ? 0 : input[id]*scale; |
| | | } |
| | | |
| | | extern "C" void forward_dropout_layer_gpu(dropout_layer layer, network_state state) |
| | | void forward_dropout_layer_gpu(dropout_layer layer, network_state state) |
| | | { |
| | | if (!state.train) return; |
| | | int size = layer.inputs*layer.batch; |
| | |
| | | check_error(cudaPeekAtLastError()); |
| | | } |
| | | |
| | | extern "C" void backward_dropout_layer_gpu(dropout_layer layer, network_state state) |
| | | void backward_dropout_layer_gpu(dropout_layer layer, network_state state) |
| | | { |
| | | if(!state.delta) return; |
| | | int size = layer.inputs*layer.batch; |