Skip to content

Commit 4560ce7

Browse files
committed
TMRegion: remove the hack for NTA_DEBUG
which is superfulous and should not inverfere with the logic of the region
1 parent 34f9b6f commit 4560ce7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bindings/py/tests/regions/network_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def testBuiltInRegions(self):
280280
"""
281281
import htm
282282
net = engine.Network()
283-
net.setLogLevel(htm.bindings.engine_internal.LogLevel.Verbose) # Verbose shows data inputs and outputs while executing.
283+
#net.setLogLevel(htm.bindings.engine_internal.LogLevel.Verbose) # Verbose shows data inputs and outputs while executing.
284284

285285
encoder = net.addRegion("encoder", "ScalarSensor", "{n: 6, w: 2}");
286286
sp = net.addRegion("sp", "SPRegion", "{columnCount: 200}");

src/htm/regions/TMRegion.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void TMRegion::compute() {
232232
out = getOutput("bottomUpOut");
233233
//set NTA_LOG_LEVEL = htm::LogLevel::LogLevel_Verbose
234234
//to output the NTA_DEBUG statements below
235-
if (out && (out->hasOutgoingLinks() || NTA_LOG_LEVEL == LogLevel::LogLevel_Verbose)) {
235+
if (out && out->hasOutgoingLinks() ) {
236236
SDR& sdr = out->getData().getSDR();
237237
tm_->getActiveCells(sdr); //active cells
238238
if (args_.orColumnOutputs) { //output as columns
@@ -241,24 +241,24 @@ void TMRegion::compute() {
241241
NTA_DEBUG << "bottomUpOut " << *out << std::endl;
242242
}
243243
out = getOutput("activeCells");
244-
if (out && (out->hasOutgoingLinks() || NTA_LOG_LEVEL == LogLevel::LogLevel_Verbose)) {
244+
if (out && out->hasOutgoingLinks() ) {
245245
tm_->getActiveCells(out->getData().getSDR());
246246
NTA_DEBUG << "active " << *out << std::endl;
247247
}
248248
out = getOutput("predictedActiveCells");
249-
if (out && (out->hasOutgoingLinks() || NTA_LOG_LEVEL == LogLevel::LogLevel_Verbose)) {
249+
if (out && out->hasOutgoingLinks() ) {
250250
tm_->activateDendrites();
251251
tm_->getWinnerCells(out->getData().getSDR());
252252
NTA_DEBUG << "winners " << *out << std::endl;
253253
}
254254
out = getOutput("anomaly");
255-
if (out && (out->hasOutgoingLinks() || NTA_LOG_LEVEL == LogLevel::LogLevel_Verbose)) {
255+
if (out && out->hasOutgoingLinks() ) {
256256
Real32* buffer = reinterpret_cast<Real32*>(out->getData().getBuffer());
257257
buffer[0] = tm_->anomaly;
258258
NTA_DEBUG << "anomaly " << *out << std::endl;
259259
}
260260
out = getOutput("predictiveCells");
261-
if (out && (out->hasOutgoingLinks() || NTA_LOG_LEVEL == LogLevel::LogLevel_Verbose)) {
261+
if (out && out->hasOutgoingLinks() ) {
262262
out->getData().getSDR() = tm_->getPredictiveCells();
263263
NTA_DEBUG << "predictive " << *out << std::endl;
264264
}

0 commit comments

Comments
 (0)