Joseph Redmon
2014-11-19 7c120aef23fde5b215b0fb6eef3074a15f16ff69
src/convolutional_layer.h
@@ -1,19 +1,21 @@
#ifndef CONVOLUTIONAL_LAYER_H
#define CONVOLUTIONAL_LAYER_H
#ifdef GPU
#include "opencl.h"
#endif
#include "image.h"
#include "activations.h"
typedef struct {
    float learning_rate;
    float momentum;
    float decay;
    int batch;
    int h,w,c;
    int n;
    int size;
    int stride;
    int pad;
    float *filters;
    float *filter_updates;
    float *filter_momentum;
@@ -45,12 +47,15 @@
#ifdef GPU
void forward_convolutional_layer_gpu(convolutional_layer layer, cl_mem in);
void backward_convolutional_layer_gpu(convolutional_layer layer, cl_mem delta_cl);
void update_convolutional_layer_gpu(convolutional_layer layer);
void push_convolutional_layer(convolutional_layer layer);
#endif
convolutional_layer *make_convolutional_layer(int batch, int h, int w, int c, int n, int size, int stride, ACTIVATION activation);
convolutional_layer *make_convolutional_layer(int batch, int h, int w, int c, int n, int size, int stride, int pad, ACTIVATION activation, float learning_rate, float momentum, float decay);
void resize_convolutional_layer(convolutional_layer *layer, int h, int w, int c);
void forward_convolutional_layer(const convolutional_layer layer, float *in);
void update_convolutional_layer(convolutional_layer layer, float step, float momentum, float decay);
void update_convolutional_layer(convolutional_layer layer);
image *visualize_convolutional_layer(convolutional_layer layer, char *window, image *prev_filters);
void backward_convolutional_layer(convolutional_layer layer, float *delta);