8000 Minor changes to tidy up code · codinghead/simple-neural-network@a62dabd · GitHub
[go: up one dir, main page]

Skip to content

Commit a62dabd

Browse files
committed
Minor changes to tidy up code
1 parent a5f4589 commit a62dabd

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

arduino/neural/Neural.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ static double sigmoid(double x) {
1111
return (1 / (1 + exp(-x)));
1212
}
1313

14-
static double derivativeSigmoid(double x) {
15-
return (sigmoid(x) * (1 - sigmoid(x)));
16-
}
17-
1814
Neural::Neural(int inputs, int hidden, int outputs)
1915
{
2016
// Set all variables to zero to start that don't have to be defined here

arduino/neural/Neural.h

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ class Neural
4141
void calculateOutput();
4242

4343
void setLearningRate(double bias);
44-
double getLearningRate();
44+
double getLearningRate();
4545
void setBiasInputToHidden(double bias);
46-
double getBiasInputToHidden();
46+
double getBiasInputToHidden();
4747
void setBiasHiddenToOutput(double bias);
48-
double getBiasHiddenToOutput();
48+
double getBiasHiddenToOutput();
4949
void turnLearningOn();
5050
void turnLearningOff();
5151
void setInputNode(int node, double value);
52-
double getInputNode(int node);
52+
double getInputNode(int node);
5353
void setOutputNodeDesired(int node, double value);
54-
double getOutputNodeDesired(int node);
54+
double getOutputNodeDesired(int node);
5555
int getNoOfInputNodes();
5656
int getNoOfHiddenNodes();
5757
int getNoOfOutputNodes();
58-
double getOutputNode(int node);
58+
double getOutputNode(int node);
5959
void displayInputToHiddenWeightsCurrent();
6060
void displayHiddenToOutputWeightsCurrent();
6161
void turnVerboseOn();
@@ -70,17 +70,6 @@ class Neural
7070
void displayInputNodes();
7171
void displayHiddenNodes();
7272
void displayOutputNodes();
73-
74-
/*
75-
76-
77-
void seed(int x) {
78-
randomSeed(x);
79-
}
80-
81-
82-
*/
83-
8473
};
8574

8675
#endif

0 commit comments

Comments
 (0)
0