Skip to content

Commit

Permalink
Update FitnessFunctionKernel.cu
Browse files Browse the repository at this point in the history
Update indexing
  • Loading branch information
gprabowski authored Nov 16, 2020
1 parent d42be31 commit f367963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FitnessFunctionKernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ __global__ void calculate_fitness(

float x = 0.0f;
for(int k = 0; k < node_number; ++k) {
x += mapWeights[j * node_number + k + node_number * node_number * index] * mapInput[k];
x += mapWeights[j * node_number + k + node_number * node_number * index] * mapInput[k + index * node_number];
}

float y = 1.0 / (1.0 + expf(-5 * x));
Expand Down

0 comments on commit f367963

Please sign in to comment.