darknet/src/detection_layer.h

29 lines
808 B
C
Raw Normal View History

2014-07-14 09:07:51 +04:00
#ifndef DETECTION_LAYER_H
#define DETECTION_LAYER_H
typedef struct {
int batch;
2015-03-05 01:56:38 +03:00
int inputs;
int classes;
int coords;
int rescore;
2014-07-14 09:07:51 +04:00
float *output;
2015-03-05 01:56:38 +03:00
float *delta;
2014-07-14 09:07:51 +04:00
#ifdef GPU
2015-03-05 01:56:38 +03:00
float * output_gpu;
float * delta_gpu;
2014-07-14 09:07:51 +04:00
#endif
2015-03-05 01:56:38 +03:00
} detection_layer;
2014-07-14 09:07:51 +04:00
2015-03-05 01:56:38 +03:00
detection_layer *make_detection_layer(int batch, int inputs, int classes, int coords, int rescore);
void forward_detection_layer(const detection_layer layer, float *in, float *truth);
void backward_detection_layer(const detection_layer layer, float *in, float *delta);
int get_detection_layer_output_size(detection_layer layer);
#ifdef GPU
void forward_detection_layer_gpu(const detection_layer layer, float *in, float *truth);
void backward_detection_layer_gpu(detection_layer layer, float *in, float *delta);
#endif
2014-07-14 09:07:51 +04:00
#endif