Skip to content
Permalink
Browse files

From scratch. Bench: 3455679.

  • Loading branch information...
Stefano80 committed Mar 2, 2019
1 parent 02538fc commit a08cd69d44928947a7c30c90611e54317f0ea4fa
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/search.cpp
@@ -173,7 +173,7 @@ int infer(float input[percInput]){
return bestClass;
}

void train(float input[percInput], int prediction){
void train(float input[percInput]){
for (int d1 = 0; d1 < percOutput; d1++){
perceptronWeights[0][d1] -= ((perceptronWeights[0][d1] > 0) - (perceptronWeights[0][d1] >= 0)) * 0.01;
for (int d2 = 0; d2 < percInput; d2++){
@@ -1119,7 +1119,7 @@ namespace {
if (trainPerc){
int result = (value > alpha) + (value >= beta);
if (prediction != result){
train(features, prediction);
train(features);
}
trainPerc = false;
}

0 comments on commit a08cd69

Please sign in to comment.
You can’t perform that action at this time.