mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
stable
This commit is contained in:
@ -2,17 +2,24 @@
|
||||
#define COST_LAYER_H
|
||||
#include "opencl.h"
|
||||
|
||||
typedef enum{
|
||||
SSE, DETECTION
|
||||
} COST_TYPE;
|
||||
|
||||
typedef struct {
|
||||
int inputs;
|
||||
int batch;
|
||||
float *delta;
|
||||
float *output;
|
||||
COST_TYPE type;
|
||||
#ifdef GPU
|
||||
cl_mem delta_cl;
|
||||
#endif
|
||||
} cost_layer;
|
||||
|
||||
cost_layer *make_cost_layer(int batch, int inputs);
|
||||
COST_TYPE get_cost_type(char *s);
|
||||
char *get_cost_string(COST_TYPE a);
|
||||
cost_layer *make_cost_layer(int batch, int inputs, COST_TYPE type);
|
||||
void forward_cost_layer(const cost_layer layer, float *input, float *truth);
|
||||
void backward_cost_layer(const cost_layer layer, float *input, float *delta);
|
||||
|
||||
|
Reference in New Issue
Block a user