template <typename Dtype>
__global__ void BNLLBackward(const int n, const Dtype* in_diff,
const Dtype* in_data, Dtype* out_diff) {
- CUDA_KERNEL_LOOP(index < n) {
+ CUDA_KERNEL_LOOP(index, n) {
Dtype expval = exp(min(in_data[index], Dtype(kBNLL_THRESHOLD)));
out_diff[index] = in_diff[index] * expval / (expval + 1.);
}
const int num, const int channels, const int height,
const int width, const int pooled_height, const int pooled_width,
const int ksize, const int stride, float* rand_idx, Dtype* top_data) {
- CUDA_KERNEL_LLOP(index, nthreads) {
+ CUDA_KERNEL_LOOP(index, nthreads) {
int pw = index % pooled_width;
int ph = (index / pooled_width) % pooled_height;
int c = (index / pooled_width / pooled_height) % channels;