-
Notifications
You must be signed in to change notification settings - Fork 1
/
relief_pooling_layer.cu
executable file
·40 lines (31 loc) · 1.17 KB
/
relief_pooling_layer.cu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// ------------------------------------------------------------------
// Fast R-CNN
// Copyright (c) 2015 Microsoft
// Licensed under The MIT License [see fast-rcnn/LICENSE for details]
// Written by Ross Girshick
// ------------------------------------------------------------------
#include <cfloat>
#include "caffe/r2cnn_layers.hpp"
using std::max;
using std::min;
namespace caffe {
template <typename Dtype>
__global__ void ReliefROIForward(const int nthreads, const Dtype* bottom_data,
const int channels, const int height,
const int width,Dtype* top_data) {
CUDA_KERNEL_LOOP(index, nthreads) {}
}
template <typename Dtype>
void ReliefROILayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
const Dtype* bottom_data = bottom[0]->gpu_data();
ReliefROIForward<Dtype><<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>();
CUDA_POST_KERNEL_CHECK;
}
template <typename Dtype>
void ReliefROILayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
NOT_IMPLEMENTED;
}
INSTANTIATE_LAYER_GPU_FUNCS(ReliefROILayer);
} // namespace caffe