Skip to content

Commit

Permalink
merge fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
breznak committed Aug 2, 2019
1 parent cb85767 commit c2660a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/htm/algorithms/SpatialPooler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ SpatialPooler::SpatialPooler() {
}

SpatialPooler::SpatialPooler(
const vector<UInt> inputDimensions, const vector<UInt> columnDimensions,
const vector<UInt>& inputDimensions, const vector<UInt>& columnDimensions,
UInt potentialRadius, Real potentialPct, bool globalInhibition,
Real localAreaDensity,
UInt stimulusThreshold, Real synPermInactiveDec, Real synPermActiveInc,
Expand Down Expand Up @@ -401,7 +401,6 @@ void SpatialPooler::initialize(
// 1D input produces 1D output; 2D => 2D, etc. //TODO allow nD -> mD conversion
NTA_CHECK(inputDimensions_.size() == columnDimensions_.size());

NTA_CHECK(localAreaDensity > 0 && localAreaDensity <= MAX_LOCALAREADENSITY);
setLocalAreaDensity(localAreaDensity);

rng_ = Random(seed);
Expand Down
8 changes: 4 additions & 4 deletions src/htm/algorithms/SpatialPooler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class SpatialPooler : public Serializable
static const constexpr Real BOOSTING_EXP = 1.0f * htm::Epsilon; //any value > BOOSTING_DISABLED enables the exponential boosting mode

SpatialPooler();
SpatialPooler(const vector<UInt> inputDimensions,
const vector<UInt> columnDimensions,
SpatialPooler(const vector<UInt>& inputDimensions,
const vector<UInt>& columnDimensions,
UInt potentialRadius = 16u,
Real potentialPct = 0.5f,
bool globalInhibition = true,
Expand Down Expand Up @@ -212,8 +212,8 @@ class SpatialPooler : public Serializable
*/
virtual void
initialize(const vector<UInt> inputDimensions,
const vector<UInt> columnDimensions,
initialize(const vector<UInt>& inputDimensions,
const vector<UInt>& columnDimensions,
UInt potentialRadius = 16u,
Real potentialPct = 0.5f,
bool globalInhibition = true,
Expand Down

0 comments on commit c2660a2

Please sign in to comment.