You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/examples/mnist/MNIST_SP.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ void setup() {
88
88
/* synPermConnected */0.5f, //no difference, let's leave at 0.5 in the middle
89
89
/* minPctOverlapDutyCycles */0.2f, //speed of re-learning?
90
90
/* dutyCyclePeriod */1402,
91
-
/* boostStrength */7.0f, // Boosting does help, but entropy is high, on MNIST it does not matter, for learning with TM prefer boosting off (=0.0), or "neutral"=1.0
91
+
/* boostStrength */7.0f, // Boosting does help, but entropy is high, on MNIST it does not matter, for learning with TM prefer boosting off (BOOSTING_DISABLED), or "neutral"=1.0
92
92
/* seed */4u,
93
93
/* spVerbosity */1u,
94
94
/* wrapAround */true); // does not matter (helps slightly)
(UInt)(pow((Real)(2 * inhibitionRadius_ + 1), (Real)columnDimensions_.size()));//FIXME make this correct for nD with smaller dims: (28,28) vs (28,28,1) vs (28*28, 1)
Copy file name to clipboardExpand all lines: src/htm/algorithms/SpatialPooler.hpp
+22-10Lines changed: 22 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -35,8 +35,6 @@ namespace htm {
35
35
36
36
usingnamespacestd;
37
37
38
-
staticconstint DISABLED = -1; //value denoting a feature is disabled
39
-
40
38
/**
41
39
* CLA spatial pooler implementation in C++.
42
40
*
@@ -63,19 +61,30 @@ static const int DISABLED = -1; //value denoting a feature is disabled
63
61
classSpatialPooler : publicSerializable
64
62
{
65
63
public:
64
+
staticconstconstexpr Real DISABLED = -1.0f; //value denoting a feature is disabled
65
+
//boosting modes:
66
66
staticconstconstexpr Real BOOSTING_DISABLED = 0.0f;
67
-
staticconstconstexpr Real BOOSTING_LOG = -1234.0f;
67
+
staticconstconstexpr Real BOOSTING_LOG = -1.0f * htm::Epsilon; //negative value closest to 0, so it's possible to search <BOOSTING_LOG, (DISABLED=0.0),..10.0> in parameter optimization to try all 3 combinations of boosting.
68
+
staticconstconstexpr Real BOOSTING_EXP = 1.0f * htm::Epsilon; //any value > BOOSTING_DISABLED enables the exponential boosting mode
0 commit comments