2014-08-11 23:52:07 +04:00
|
|
|
#ifndef CROP_LAYER_H
|
|
|
|
#define CROP_LAYER_H
|
|
|
|
|
2014-12-16 22:40:05 +03:00
|
|
|
#include "opencl.h"
|
2014-08-11 23:52:07 +04:00
|
|
|
#include "image.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int batch;
|
|
|
|
int h,w,c;
|
|
|
|
int crop_width;
|
|
|
|
int crop_height;
|
|
|
|
int flip;
|
|
|
|
float *output;
|
2014-12-16 22:40:05 +03:00
|
|
|
#ifdef GPU
|
|
|
|
cl_mem output_cl;
|
|
|
|
#endif
|
2014-08-11 23:52:07 +04:00
|
|
|
} crop_layer;
|
|
|
|
|
|
|
|
image get_crop_image(crop_layer layer);
|
|
|
|
crop_layer *make_crop_layer(int batch, int h, int w, int c, int crop_height, int crop_width, int flip);
|
|
|
|
void forward_crop_layer(const crop_layer layer, float *input);
|
2014-12-16 22:40:05 +03:00
|
|
|
|
|
|
|
#ifdef GPU
|
|
|
|
void forward_crop_layer_gpu(crop_layer layer, cl_mem input);
|
|
|
|
#endif
|
2014-08-11 23:52:07 +04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|