mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Added LSTM sequence detector, and blur data augmentation (for OpenCV only)
This commit is contained in:
@ -85,6 +85,8 @@ layer make_crnn_layer(int batch, int h, int w, int c, int hidden_filters, int ou
|
||||
l.delta_gpu = l.output_layer->delta_gpu;
|
||||
#endif
|
||||
|
||||
l.bflops = l.input_layer->bflops + l.self_layer->bflops + l.output_layer->bflops;
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
@ -128,6 +130,16 @@ void resize_crnn_layer(layer *l, int w, int h)
|
||||
#endif
|
||||
}
|
||||
|
||||
void free_state_crnn(layer l)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < l.outputs * l.batch; ++i) l.self_layer->output[i] = rand_uniform(-1, 1);
|
||||
|
||||
#ifdef GPU
|
||||
cuda_push_array(l.self_layer->output_gpu, l.self_layer->output, l.outputs * l.batch);
|
||||
#endif // GPU
|
||||
}
|
||||
|
||||
void update_crnn_layer(layer l, int batch, float learning_rate, float momentum, float decay)
|
||||
{
|
||||
update_convolutional_layer(*(l.input_layer), batch, learning_rate, momentum, decay);
|
||||
|
Reference in New Issue
Block a user