Joseph Redmon
2014-12-04 1edcf73a73d2007afc61289245763f5cf0c29e10
src/cost_layer.h
@@ -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);