Skip to content

Commit 42ea205

Browse files
committed
do not regularize bec
1 parent c0f1d3f commit 42ea205

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main_nep/snes.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,8 @@ static __global__ void gpu_find_L1_L2_NEP4(
451451
s_cost_L2reg[tid] = 0.0f;
452452
for (int v = tid; v < number_of_variables; v += blockDim.x) {
453453
const float para = g_population[bid * number_of_variables + v];
454-
if (g_type_of_variable[v] == g_type || g_type == g_num_types) {
454+
if ((g_type_of_variable[v] == g_type) && (g_type != g_num_types) ||
455+
(g_type_of_variable[v] != g_type) && (g_type == g_num_types)) {
455456
s_cost_L1reg[tid] += abs(para);
456457
s_cost_L2reg[tid] += para * para;
457458
}

0 commit comments

Comments
 (0)