Skip to content

Commit 05fee00

Browse files
committed
Revert "SP measure time inh/overlaps/other in compute()"
This reverts commit f164ea8.
1 parent a49f9b3 commit 05fee00

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

src/examples/hotgym/HelloSPTP.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ Real64 BenchmarkHotgym::run(UInt EPOCHS, bool useSPlocal, bool useSPglobal, bool
158158
cout << "Init:\t" << tInit.getElapsed() << endl;
159159
cout << "Random:\t" << tRng.getElapsed() << endl;
160160
cout << "Encode:\t" << tEnc.getElapsed() << endl;
161-
cout << "Inh " << spGlobal.tInh.getElapsed() << endl;
162-
cout << "Overlaps " << spGlobal.tOverlap.getElapsed() << endl;
163-
164161
if(useSPlocal) cout << "SP (l):\t" << tSPloc.getElapsed()*1.0f << endl;
165162
if(useSPglobal) cout << "SP (g):\t" << tSPglob.getElapsed() << endl;
166163
if(useTM) cout << "TM:\t" << tTM.getElapsed() << endl;

src/examples/mnist/MNIST_SP.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,7 @@ void train(const bool skipSP=false) {
155155
}
156156

157157
tTrain.stop();
158-
cout << "MNIST train time: " << tTrain.getElapsed() << endl;
159-
cout << "inh " << sp.tInh.getElapsed() << endl;
160-
cout << "over " << sp.tOverlap.getElapsed() << endl;
158+
cout << "MNIST train time: " << tTrain.getElapsed() << endl;
161159

162160
// Save the connections to file for postmortem analysis.
163161
ofstream dump("mnist_sp_learned.connections", ofstream::binary | ofstream::trunc | ofstream::out);

src/htm/algorithms/SpatialPooler.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,22 +463,17 @@ void SpatialPooler::compute(const SDR &input, const bool learn, SDR &active) {
463463
input.reshape( inputDimensions_ );
464464
active.reshape( columnDimensions_ );
465465
updateBookeepingVars_(learn);
466-
467-
tOverlap.start();
468466
calculateOverlap_(input, overlaps_);
469-
tOverlap.stop();
470467

471468
boostOverlaps_(overlaps_, boostedOverlaps_);
472469

473-
tInh.start();
474470
auto &activeVector = active.getSparse();
475471
inhibitColumns_(boostedOverlaps_, activeVector);
476472
// Notify the active SDR that its internal data vector has changed. Always
477473
// call SDR's setter methods even if when modifying the SDR's own data
478474
// inplace.
479475
sort( activeVector.begin(), activeVector.end() );
480476
active.setSparse( activeVector );
481-
tInh.stop();
482477

483478
if (learn) {
484479
adaptSynapses_(input, active);

src/htm/algorithms/SpatialPooler.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <htm/types/Types.hpp>
3030
#include <htm/types/Serializable.hpp>
3131
#include <htm/types/Sdr.hpp>
32-
#include <htm/os/Timer.hpp>
32+
3333

3434
namespace htm {
3535

@@ -61,7 +61,6 @@ using namespace std;
6161
class SpatialPooler : public Serializable
6262
{
6363
public:
64-
Timer tInh, tOverlap;
6564

6665
const Real MAX_LOCALAREADENSITY = 0.5f; //require atleast 2 areas
6766

0 commit comments

Comments
 (0)