|
|
|
@@ -100,12 +100,12 @@ int LRN::forward(const Mat& bottom_blob, Mat& top_blob) const |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
float alpha_div_size = alpha / local_size; |
|
|
|
|
|
|
|
if (region_type == NormRegion_ACROSS_CHANNELS) |
|
|
|
{ |
|
|
|
top_blob.fill(0.f); |
|
|
|
|
|
|
|
const float alpha_div_size = alpha / local_size; |
|
|
|
|
|
|
|
#pragma omp parallel for |
|
|
|
for (int q=0; q<channels; q++) |
|
|
|
{ |
|
|
|
@@ -149,6 +149,8 @@ int LRN::forward(const Mat& bottom_blob, Mat& top_blob) const |
|
|
|
|
|
|
|
const int maxk = local_size * local_size; |
|
|
|
|
|
|
|
const float alpha_div_size = alpha / maxk; |
|
|
|
|
|
|
|
// norm window offsets |
|
|
|
std::vector<int> _space_ofs(maxk); |
|
|
|
int* space_ofs = &_space_ofs[0]; |
|
|
|
@@ -225,8 +227,6 @@ int LRN::forward_inplace(Mat& bottom_top_blob) const |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
float alpha_div_size = alpha / local_size; |
|
|
|
|
|
|
|
if (region_type == NormRegion_ACROSS_CHANNELS) |
|
|
|
{ |
|
|
|
Mat square_sum; |
|
|
|
@@ -235,6 +235,8 @@ int LRN::forward_inplace(Mat& bottom_top_blob) const |
|
|
|
return -100; |
|
|
|
square_sum.fill(0.f); |
|
|
|
|
|
|
|
const float alpha_div_size = alpha / local_size; |
|
|
|
|
|
|
|
#pragma omp parallel for |
|
|
|
for (int q=0; q<channels; q++) |
|
|
|
{ |
|
|
|
@@ -278,6 +280,8 @@ int LRN::forward_inplace(Mat& bottom_top_blob) const |
|
|
|
|
|
|
|
const int maxk = local_size * local_size; |
|
|
|
|
|
|
|
const float alpha_div_size = alpha / maxk; |
|
|
|
|
|
|
|
// norm window offsets |
|
|
|
std::vector<int> _space_ofs(maxk); |
|
|
|
int* space_ofs = &_space_ofs[0]; |
|
|
|
|