Skip to content

Commit 2bfeac6

Browse files
committed
clean up the rest of the temp sys outs
1 parent 76461c3 commit 2bfeac6

File tree

6 files changed

+27
-36
lines changed

6 files changed

+27
-36
lines changed

src/main/java/org/numenta/nupic/network/Layer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ private int[] spatialInput(int[] input) {
17101710
return input;
17111711
}
17121712
spatialPooler.compute(connections, input, feedForwardActiveColumns, sensor == null || sensor.getMetaInfo().isLearn(), isLearn);
1713-
//
1713+
17141714
return feedForwardActiveColumns;
17151715
}
17161716

@@ -1740,7 +1740,6 @@ private int[] temporalInput(int[] input, ManualInput mi) {
17401740
mi.predictiveCells(predictiveCells = cc.predictiveCells);
17411741
// Store activeCells
17421742
mi.activeCells(activeCells = cc.activeCells());
1743-
System.out.println(Layer.this.name + ": " + mi + " " + activeCells);
17441743
// Store the Compute Cycle
17451744
mi.computeCycle = cc;
17461745
return SDR.asCellIndices(activeCells = cc.activeCells());

src/main/java/org/numenta/nupic/network/ManualInput.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ public class ManualInput implements Inference {
9393
/**
9494
* Constructs a new {@code ManualInput}
9595
*/
96-
public ManualInput() {
97-
System.out.println("watching this");
98-
}
96+
public ManualInput() {}
9997

10098
/**
10199
* Sets the current record num associated with this {@code ManualInput}

src/test/java/org/numenta/nupic/algorithms/SpatialPoolerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ public int[] inhibitColumns(Connections c, double[] overlaps) {
153153
}
154154

155155
for(int i = 0;i < mem.getNumColumns();i++) {
156-
System.out.println(Arrays.toString((int[])mem.getConnectedCounts().getSlice(i)));
157-
System.out.println(Arrays.toString(mem.getPotentialPools().get(i).getDensePermanences(mem)));
156+
// System.out.println(Arrays.toString((int[])mem.getConnectedCounts().getSlice(i)));
157+
// System.out.println(Arrays.toString(mem.getPotentialPools().get(i).getDensePermanences(mem)));
158158
assertTrue(Arrays.equals(inputVector, ((int[])mem.getConnectedCounts().getSlice(i))));
159159
}
160160
}

src/test/java/org/numenta/nupic/network/LayerTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public void testResetRecordNum() {
209209
@Override public void onCompleted() {}
210210
@Override public void onError(Throwable e) { e.printStackTrace(); }
211211
@Override public void onNext(Inference output) {
212-
System.out.println("output = " + Arrays.toString(output.getSDR()));
212+
// System.out.println("output = " + Arrays.toString(output.getSDR()));
213213
}
214214
});
215215

@@ -1125,15 +1125,15 @@ public void onNext(Inference i) {
11251125
}
11261126

11271127
// UNCOMMENT TO WATCH THE RESULTS STABILIZE
1128-
System.out.println("current ho active = " + i.getActiveCells());
1129-
System.out.println("current ho sorted = " + Arrays.toString(i.getSDR()));
1130-
if(i.getPreviousPredictiveCells() != null) {
1131-
System.out.println("curr pred cell cols = " + Arrays.toString(SDR.cellsAsColumnIndices(i.getPredictiveCells(), l.getConnections().getCellsPerColumn())));
1132-
System.out.println("prev pred cell cols = " + Arrays.toString(SDR.cellsAsColumnIndices(i.getPreviousPredictiveCells(), l.getConnections().getCellsPerColumn())));
1133-
}
1134-
System.out.println("current ff active = " + Arrays.toString(i.getFeedForwardSparseActives()));
1135-
System.out.println("rec# " + i.getRecordNum() + ", input " + i.getLayerInput() + ", anomaly = " + i.getAnomalyScore() + ", inference = " + l.getInference());
1136-
System.out.println("----------------------------------------");
1128+
// System.out.println("current ho active = " + i.getActiveCells());
1129+
// System.out.println("current ho sorted = " + Arrays.toString(i.getSDR()));
1130+
// if(i.getPreviousPredictiveCells() != null) {
1131+
// System.out.println("curr pred cell cols = " + Arrays.toString(SDR.cellsAsColumnIndices(i.getPredictiveCells(), l.getConnections().getCellsPerColumn())));
1132+
// System.out.println("prev pred cell cols = " + Arrays.toString(SDR.cellsAsColumnIndices(i.getPreviousPredictiveCells(), l.getConnections().getCellsPerColumn())));
1133+
// }
1134+
// System.out.println("current ff active = " + Arrays.toString(i.getFeedForwardSparseActives()));
1135+
// System.out.println("rec# " + i.getRecordNum() + ", input " + i.getLayerInput() + ", anomaly = " + i.getAnomalyScore() + ", inference = " + l.getInference());
1136+
// System.out.println("----------------------------------------");
11371137
}
11381138
});
11391139

@@ -1303,7 +1303,7 @@ public void testFullLayerFluentAssembly() {
13031303
p.setParameterByKey(KEY.INHIBITION_RADIUS, 50);
13041304
p.setParameterByKey(KEY.GLOBAL_INHIBITIONS, true);
13051305

1306-
System.out.println(p);
1306+
// System.out.println(p);
13071307

13081308
Map<String, Object> params = new HashMap<>();
13091309
params.put(KEY_MODE, Mode.PURE);

src/test/java/org/numenta/nupic/network/NetworkTest.java

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void testResetRecordNum() {
9494
@Override public void onCompleted() {}
9595
@Override public void onError(Throwable e) { e.printStackTrace(); }
9696
@Override public void onNext(Inference output) {
97-
System.out.println("output = " + Arrays.toString(output.getSDR()));
97+
// System.out.println("output = " + Arrays.toString(output.getSDR()));
9898
}
9999
});
100100

@@ -339,17 +339,13 @@ public void testRegionHierarchies() {
339339
Region r2 = network.lookup("r2");
340340

341341
network.observe().subscribe(new Subscriber<Inference>() {
342-
int iterCount = 0;
343342
@Override public void onCompleted() {}
344343
@Override public void onError(Throwable e) { e.printStackTrace(); }
345344
@Override public void onNext(Inference i) {
346345
netInference = (ManualInput)i;
347-
++iterCount;
348-
if(true) { //netInference.getPredictiveCells().size() > 15) {
349-
System.out.println("iterCount = " + iterCount);
346+
if(r1.getHead().getInference().getPredictiveCells().size() > 0 &&
347+
r2.getHead().getInference().getPredictiveCells().size() > 0) {
350348
network.halt();
351-
System.out.println("r1 = " + r1.getHead().getInference().getActiveCells());
352-
System.out.println("r2 = " + r2.getHead().getInference().getActiveCells());
353349
}
354350
}
355351
});
@@ -374,14 +370,12 @@ public void testRegionHierarchies() {
374370
// Let run for 5 secs.
375371
try {
376372
r2.lookup("1").getLayerThread().join();//5000);
377-
System.out.println("top ff = " + Arrays.toString(topInference.getFeedForwardSparseActives()));
378-
System.out.println("bot ff = " + Arrays.toString(bottomInference.getFeedForwardSparseActives()));
379-
System.out.println("top pred = " + topInference.getPredictiveCells());
380-
System.out.println("bot pred = " + bottomInference.getPredictiveCells());
381-
System.out.println("top active = " + topInference.getActiveCells());
382-
System.out.println("bot active = " + bottomInference.getActiveCells());
383-
assertTrue(!Arrays.equals(topInference.getFeedForwardSparseActives(),
384-
bottomInference.getFeedForwardSparseActives()));
373+
// System.out.println("top ff = " + Arrays.toString(topInference.getFeedForwardSparseActives()));
374+
// System.out.println("bot ff = " + Arrays.toString(bottomInference.getFeedForwardSparseActives()));
375+
// System.out.println("top pred = " + topInference.getPredictiveCells());
376+
// System.out.println("bot pred = " + bottomInference.getPredictiveCells());
377+
// System.out.println("top active = " + topInference.getActiveCells());
378+
// System.out.println("bot active = " + bottomInference.getActiveCells());
385379
assertTrue(!topInference.getPredictiveCells().equals(bottomInference.getPredictiveCells()));
386380
assertTrue(topInference.getPredictiveCells().size() > 0);
387381
assertTrue(bottomInference.getPredictiveCells().size() > 0);
@@ -687,7 +681,7 @@ public void testObservableWithCoordinateEncoder() {
687681
//System.out.println(output.getRecordNum() + ": input = " + Arrays.toString(output.getEncoding()));//output = " + Arrays.toString(output.getSDR()) + ", " + output.getAnomalyScore());
688682
if(output.getAnomalyScore() < anomaly) {
689683
anomaly = output.getAnomalyScore();
690-
System.out.println("anomaly = " + anomaly);
684+
// System.out.println("anomaly = " + anomaly);
691685
}
692686
}
693687
});

src/test/java/org/numenta/nupic/network/RegionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ public void testHalt() {
201201
r1.observe().subscribe(new Subscriber<Inference>() {
202202
int seq = 0;
203203
@Override public void onCompleted() {
204-
System.out.println("onCompleted() called");
204+
// System.out.println("onCompleted() called");
205205
}
206206
@Override public void onError(Throwable e) { e.printStackTrace(); }
207207
@Override public void onNext(Inference i) {
208208
if(seq == 2) {
209209
isHalted = true;
210210
}
211211
seq++;
212-
System.out.println("output: " + i.getSDR());
212+
// System.out.println("output: " + i.getSDR());
213213
}
214214
});
215215

0 commit comments

Comments
 (0)