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
* -- this will be my working model, reasonable performance/speed ratio
58
+
*
59
+
*/
44
60
45
61
private:
46
62
SpatialPooler sp;
@@ -51,31 +67,31 @@ class MNIST {
51
67
52
68
public:
53
69
UInt verbosity = 1;
54
-
const UInt train_dataset_iterations = 1u;
70
+
const UInt train_dataset_iterations = 2u; //epochs somewhat help, at linear time
55
71
56
72
57
73
voidsetup() {
58
74
59
-
input.initialize({28 * 28});
60
-
columns.initialize({10 * 1000});
75
+
input.initialize({28, 28,1});
76
+
columns.initialize({28, 28, 8});//1D vs 2D no big difference, 2D seems more natural for the problem. Speed-----, Results+++++++++; #columns HIGHEST impact.
61
77
sp.initialize(
62
78
/* inputDimensions */ input.dimensions,
63
79
/* columnDimensions */ columns.dimensions,
64
-
/* potentialRadius */999999u, //No topology, all to all connections.
65
-
/* potentialPct */0.65f,
66
-
/* globalInhibition */true,
67
-
/* localAreaDensity */0.05f, // % active bits
80
+
/* potentialRadius */7, //with 2D, 7 results in 15x15 area, which is cca 25% for the input area. Slightly improves than 99999 aka "no topology, all to all connections"
81
+
/* potentialPct */0.1f, //we have only 10 classes, and << #columns. So we want to force each col to specialize. Cca 0.3 w "7" above, or very small (0.1) for "no topology". Cannot be too small due to internal checks. Speed++
82
+
/* globalInhibition */true,//Speed+++++++; SDR quality-- (global does have active nearby cols, which we want to avoid (local)); Results+-0
83
+
/* localAreaDensity */0.1f, // % active bits
68
84
/* numActiveColumnsPerInhArea */ -1,
69
85
/* stimulusThreshold */6u,
70
-
/* synPermInactiveDec */0.005f,
71
-
/* synPermActiveInc */0.014f,
72
-
/* synPermConnected */0.1f,
73
-
/* minPctOverlapDutyCycles */0.001f,
86
+
/* synPermInactiveDec */0.002f, //FIXME inactive decay permanence plays NO role, investigate! (slightly better w/o it)
87
+
/* synPermActiveInc */0.14f, //takes upto 5x steps to get dis/connected
88
+
/* synPermConnected */0.5f, //no difference, let's leave at 0.5 in the middle
89
+
/* minPctOverlapDutyCycles */0.2f, //speed of re-learning?
74
90
/* dutyCyclePeriod */1402,
75
-
/* boostStrength */7.8f, // Boosting does help
76
-
/* seed */93u,
91
+
/* boostStrength */2.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
92
+
/* seed */4u,
77
93
/* spVerbosity */1u,
78
-
/* wrapAround */false); //No topology, turn off wrapping
94
+
/* wrapAround */true); //does not matter (helps slightly)
79
95
80
96
// Save the connections to file for postmortem analysis.
0 commit comments