diff --git a/bindings/py/cpp_src/bindings/algorithms/py_TemporalMemory.cpp b/bindings/py/cpp_src/bindings/algorithms/py_TemporalMemory.cpp index 62bb758847..0759590dee 100644 --- a/bindings/py/cpp_src/bindings/algorithms/py_TemporalMemory.cpp +++ b/bindings/py/cpp_src/bindings/algorithms/py_TemporalMemory.cpp @@ -116,11 +116,13 @@ Argument checkInputs Whether to check that the activeColumns are sorted without duplicates. Disable this for a small speed boost. -Argument extra - Number of external predictive inputs. These inputs are used in addition to - the cells which are part of this TemporalMemory. The TemporalMemory - requires all external inputs be identified by an index in the - range [0, extra). +Argument externalPredictiveInputs + Number of external predictive inputs. These values are not related to this + TM, they represent input from a different region. This TM will form + synapses with these inputs in addition to the cells which are part of this + TemporalMemory. If this is given (and greater than 0) then the active + cells and winner cells of these external inputs must be given to methods + TM.compute and TM.activateDendrites )" , py::arg("columnDimensions") , py::arg("cellsPerColumn") = 32 @@ -136,7 +138,7 @@ Argument extra , py::arg("maxSegmentsPerCell") = 255 , py::arg("maxSynapsesPerSegment") = 255 , py::arg("checkInputs") = true - , py::arg("extra") = 0u + , py::arg("externalPredictiveInputs") = 0u ); py_HTM.def("printParameters", @@ -192,8 +194,8 @@ dendrite segments. Grow and reinforce synapses.)" py::arg("learn") = true); py_HTM.def("compute", [](HTM_t& self, const SDR &activeColumns, bool learn, - const SDR &extraActive, const SDR &extraWinners) - { self.compute(activeColumns, learn, extraActive, extraWinners); }, + const SDR &externalPredictiveInputsActive, const SDR &externalPredictiveInputsWinners) + { self.compute(activeColumns, learn, externalPredictiveInputsActive, externalPredictiveInputsWinners); }, R"(Perform one time step of the Temporal Memory algorithm. This method calls activateDendrites, then calls activateCells. Using @@ -206,20 +208,19 @@ Argument activeColumns Argument learn Whether or not learning is enabled. -Argument extraActive +Argument externalPredictiveInputsActive (optional) SDR of active external predictive inputs. - External inputs must be cell indexes in the range [0, extra). - TM must be set up with the 'extra' constructor parameter for this use. + TM must be set up with the 'externalPredictiveInputs' constructor parameter for this use. -Argument extraWinners +Argument externalPredictiveInputsWinners (optional) SDR of winning external predictive inputs. When learning, only these inputs are considered active. - ExtraWinners must be a subset of extraActive. + externalPredictiveInputsWinners must be a subset of externalPredictiveInputsActive. )", py::arg("activeColumns"), py::arg("learn") = true, - py::arg("extraActive"), - py::arg("extraWinners")); + py::arg("externalPredictiveInputsActive"), + py::arg("externalPredictiveInputsWinners")); py_HTM.def("reset", &HTM_t::reset, R"(Indicates the start of a new sequence. @@ -235,14 +236,14 @@ Resets sequence state of the TM.)"); }); py_HTM.def("activateDendrites", [](HTM_t &self, bool learn) { - SDR extra({ self.extra }); - self.activateDendrites(learn, extra, extra); + SDR externalPredictiveInputs({ self.externalPredictiveInputs }); + self.activateDendrites(learn, externalPredictiveInputs, externalPredictiveInputs); }, py::arg("learn")); py_HTM.def("activateDendrites", - [](HTM_t &self, bool learn,const SDR &extraActive, const SDR &extraWinners) - { self.activateDendrites(learn, extraActive, extraWinners); }, + [](HTM_t &self, bool learn,const SDR &externalPredictiveInputsActive, const SDR &externalPredictiveInputsWinners) + { self.activateDendrites(learn, externalPredictiveInputsActive, externalPredictiveInputsWinners); }, R"(Calculate dendrite segment activity, using the current active cells. Call this method before calling getPredictiveCells, getActiveSegments, or getMatchingSegments. In each time step, only the first call to this @@ -253,18 +254,18 @@ Argument learn If true, segment activations will be recorded. This information is used during segment cleanup. -Argument extraActive +Argument externalPredictiveInputsActive (optional) SDR of active external predictive inputs. -Argument extraWinners +Argument externalPredictiveInputsWinners (optional) SDR of winning external predictive inputs. When learning, only these inputs are considered active. - ExtraWinners must be a subset of extraActive. + externalPredictiveInputsWinners must be a subset of externalPredictiveInputsActive. See TM.compute() for details of the parameters.)", py::arg("learn"), - py::arg("extraActive"), - py::arg("extraWinners")); + py::arg("externalPredictiveInputsActive"), + py::arg("externalPredictiveInputsWinners")); py_HTM.def("getPredictiveCells", [](const HTM_t& self) { return self.getPredictiveCells();}, @@ -324,10 +325,11 @@ R"(Returns the total number of mini-columns.)"); py_HTM.def_property_readonly("connections", [](const HTM_t &self) { return self.connections; }, R"(Internal Connections object. Danger! -Modifying this may detrimentially effect the TM. +Modifying this may detrimentally effect the TM. The Connections class API is subject to change.)"); - py_HTM.def_property_readonly("extra", [](const HTM_t &self) { return self.extra; }, + py_HTM.def_property_readonly("externalPredictiveInputs", [](const HTM_t &self) + { return self.externalPredictiveInputs; }, R"()"); py_HTM.def_property_readonly("anomaly", [](const HTM_t &self) { return self.anomaly; }, diff --git a/src/htm/algorithms/TemporalMemory.cpp b/src/htm/algorithms/TemporalMemory.cpp index 48bd7db8a1..6f88bd7f06 100644 --- a/src/htm/algorithms/TemporalMemory.cpp +++ b/src/htm/algorithms/TemporalMemory.cpp @@ -66,12 +66,12 @@ TemporalMemory::TemporalMemory( SegmentIdx maxSegmentsPerCell, SynapseIdx maxSynapsesPerSegment, bool checkInputs, - UInt extra) { + UInt externalPredictiveInputs) { initialize(columnDimensions, cellsPerColumn, activationThreshold, initialPermanence, connectedPermanence, minThreshold, maxNewSynapseCount, permanenceIncrement, permanenceDecrement, predictedSegmentDecrement, seed, maxSegmentsPerCell, - maxSynapsesPerSegment, checkInputs, extra); + maxSynapsesPerSegment, checkInputs, externalPredictiveInputs); } TemporalMemory::~TemporalMemory() {} @@ -91,7 +91,7 @@ void TemporalMemory::initialize( SegmentIdx maxSegmentsPerCell, SynapseIdx maxSynapsesPerSegment, bool checkInputs, - UInt extra) { + UInt externalPredictiveInputs) { // Validate all input parameters NTA_CHECK(columnDimensions.size() > 0) << "Number of column dimensions must be greater than 0"; @@ -123,7 +123,7 @@ void TemporalMemory::initialize( permanenceIncrement_ = permanenceIncrement; permanenceDecrement_ = permanenceDecrement; predictedSegmentDecrement_ = predictedSegmentDecrement; - extra_ = extra; + externalPredictiveInputs_ = externalPredictiveInputs; // Initialize member variables connections = Connections(static_cast(numberOfColumns() * cellsPerColumn_), connectedPermanence_); @@ -416,7 +416,7 @@ void TemporalMemory::activateCells(const SDR &activeColumns, const bool learn) { } auto &sparse = activeColumns.getSparse(); - vector prevActiveCellsDense(numberOfCells() + extra_, false); + vector prevActiveCellsDense(numberOfCells() + externalPredictiveInputs_, false); for (CellIdx cell : activeCells_) { prevActiveCellsDense[cell] = true; } @@ -475,23 +475,23 @@ void TemporalMemory::activateCells(const SDR &activeColumns, const bool learn) { void TemporalMemory::activateDendrites(const bool learn, - const SDR &extraActive, - const SDR &extraWinners) + const SDR &externalPredictiveInputsActive, + const SDR &externalPredictiveInputsWinners) { - if( extra_ > 0 ) + if( externalPredictiveInputs_ > 0 ) { - NTA_CHECK( extraActive.size == extra_ ); - NTA_CHECK( extraWinners.size == extra_ ); - NTA_CHECK( extraActive.dimensions == extraWinners.dimensions); + NTA_CHECK( externalPredictiveInputsActive.size == externalPredictiveInputs_ ); + NTA_CHECK( externalPredictiveInputsWinners.size == externalPredictiveInputs_ ); + NTA_CHECK( externalPredictiveInputsActive.dimensions == externalPredictiveInputsWinners.dimensions); #ifdef NTA_ASSERTIONS_ON - SDR both(extraActive.dimensions); - both.intersection(extraActive, extraWinners); - NTA_ASSERT(both == extraWinners) << "ExtraWinners must be a subset of ExtraActive"; + SDR both(externalPredictiveInputsActive.dimensions); + both.intersection(externalPredictiveInputsActive, externalPredictiveInputsWinners); + NTA_ASSERT(both == externalPredictiveInputsWinners) << "externalPredictiveInputsWinners must be a subset of externalPredictiveInputsActive"; #endif } else { - NTA_CHECK( extraActive.getSum() == 0u && extraWinners.getSum() == 0u ) + NTA_CHECK( externalPredictiveInputsActive.getSum() == 0u && externalPredictiveInputsWinners.getSum() == 0u ) << "External predictive inputs must be declared to TM constructor!"; } @@ -499,12 +499,12 @@ void TemporalMemory::activateDendrites(const bool learn, if( segmentsValid_ ) return; - for(const auto &active : extraActive.getSparse()) { - NTA_ASSERT( active < extra_ ); + for(const auto &active : externalPredictiveInputsActive.getSparse()) { + NTA_ASSERT( active < externalPredictiveInputs_ ); activeCells_.push_back( static_cast(active + numberOfCells()) ); } - for(const auto &winner : extraWinners.getSparse()) { - NTA_ASSERT( winner < extra_ ); + for(const auto &winner : externalPredictiveInputsWinners.getSparse()) { + NTA_ASSERT( winner < externalPredictiveInputs_ ); winnerCells_.push_back( static_cast(winner + numberOfCells()) ); } @@ -548,10 +548,10 @@ void TemporalMemory::activateDendrites(const bool learn, void TemporalMemory::compute(const SDR &activeColumns, const bool learn, - const SDR &extraActive, - const SDR &extraWinners) + const SDR &externalPredictiveInputsActive, + const SDR &externalPredictiveInputsWinners) { - activateDendrites(learn, extraActive, extraWinners); + activateDendrites(learn, externalPredictiveInputsActive, externalPredictiveInputsWinners); // Update Anomaly Metric. The anomaly is the percent of active columns that // were not predicted. @@ -564,9 +564,9 @@ void TemporalMemory::compute(const SDR &activeColumns, } void TemporalMemory::compute(const SDR &activeColumns, const bool learn) { - SDR extraActive({ extra }); - SDR extraWinners({ extra }); - compute( activeColumns, learn, extraActive, extraWinners ); + SDR externalPredictiveInputsActive({ externalPredictiveInputs_ }); + SDR externalPredictiveInputsWinners({ externalPredictiveInputs_ }); + compute( activeColumns, learn, externalPredictiveInputsActive, externalPredictiveInputsWinners ); } void TemporalMemory::reset(void) { diff --git a/src/htm/algorithms/TemporalMemory.hpp b/src/htm/algorithms/TemporalMemory.hpp index 808aecce64..4c77045d2a 100644 --- a/src/htm/algorithms/TemporalMemory.hpp +++ b/src/htm/algorithms/TemporalMemory.hpp @@ -94,6 +94,11 @@ class TemporalMemory : public Serializable * @param predictedSegmentDecrement * Amount by which segments are punished for incorrect predictions. * + * Note: A good value is just a bit larger than + * (the column-level sparsity * permanenceIncrement). So, if column-level + * sparsity is 2% and permanenceIncrement is 0.01, this parameter should be + * something like 4% * 0.01 = 0.0004). + * * @param seed * Seed for the random number generator. * @@ -108,18 +113,13 @@ class TemporalMemory : public Serializable * duplicates. Disable this for a small speed boost. * DEPRECATED: The SDR class now enforces these properties. * - * @param extra - * Number of external predictive inputs. These inputs are used in addition to - * the cells which are part of this TemporalMemory. The TemporalMemory - * requires all external inputs be identified by an index in the - * range [0, extra). - * - * Notes: - * - * predictedSegmentDecrement: A good value is just a bit larger than - * (the column-level sparsity * permanenceIncrement). So, if column-level - * sparsity is 2% and permanenceIncrement is 0.01, this parameter should be - * something like 4% * 0.01 = 0.0004). + * @param externalPredictiveInputs + * Number of external predictive inputs. These values are not related to this + * TM, they represent input from a different region. This TM will form + * synapses with these inputs in addition to the cells which are part of this + * TemporalMemory. If this is given (and greater than 0) then the active + * cells and winner cells of these external inputs must be given to methods + * TM.compute and TM.activateDendrites */ TemporalMemory( vector columnDimensions, @@ -136,7 +136,7 @@ class TemporalMemory : public Serializable SegmentIdx maxSegmentsPerCell = 255, SynapseIdx maxSynapsesPerSegment = 255, bool checkInputs = true, - UInt extra = 0); + UInt externalPredictiveInputs = 0); virtual void initialize( @@ -154,7 +154,7 @@ class TemporalMemory : public Serializable SegmentIdx maxSegmentsPerCell = 255, SynapseIdx maxSynapsesPerSegment = 255, bool checkInputs = true, - UInt extra = 0); + UInt externalPredictiveInputs = 0); virtual ~TemporalMemory(); @@ -199,27 +199,25 @@ class TemporalMemory : public Serializable * If true, segment activations will be recorded. This information is * used during segment cleanup. * - * @param extraActive - * (optional) SDR of active external predictive inputs. External inputs must be cell - * indexes in the range [0, extra). + * @param externalPredictiveInputsActive + * (optional) SDR of active external predictive inputs. * - * @param extraWinners + * @param externalPredictiveInputsWinners * (optional) SDR of winning external predictive inputs. When learning, only these * inputs are considered active. - * ExtraWinners must be a subset of extraActive. - * External inputs must be cell indices in the range [0, extra). + * externalPredictiveInputsWinners must be a subset of externalPredictiveInputsActive. * * See TM::compute() for details of the parameters. * */ void activateDendrites(const bool learn, - const SDR &extraActive, - const SDR &extraWinners); + const SDR &externalPredictiveInputsActive, + const SDR &externalPredictiveInputsWinners); inline void activateDendrites(const bool learn = true) { - const SDR extraActive(std::vector{ extra }); - const SDR extraWinners(std::vector{extra }); - activateDendrites(learn, extraActive, extraWinners); + const SDR externalPredictiveInputsActive(std::vector{ externalPredictiveInputs }); + const SDR externalPredictiveInputsWinners(std::vector{externalPredictiveInputs }); + activateDendrites(learn, externalPredictiveInputsActive, externalPredictiveInputsWinners); } /** @@ -235,22 +233,19 @@ class TemporalMemory : public Serializable * @param learn * Whether or not learning is enabled. * - * @param extraActive + * @param externalPredictiveInputsActive * (optional) Vector of active external predictive inputs. - * External inputs must be cell indexes in the range [0, extra). - * TM must be set up with the 'extra' constructor parameter for this use. + * TM must be set up with the 'externalPredictiveInputs' constructor parameter for this use. * - * @param extraWinners + * @param externalPredictiveInputsWinners * (optional) Vector of winning external predictive inputs. When learning, only these * inputs are considered active. - * ExtraWinners must be a subset of extraActive. - * External inputs must be cell indexes in the range [0, extra). - * + * externalPredictiveInputsWinners must be a subset of externalPredictiveInputsActive. */ virtual void compute(const SDR &activeColumns, const bool learn, - const SDR &extraActive, - const SDR &extraWinners); + const SDR &externalPredictiveInputsActive, + const SDR &externalPredictiveInputsWinners); virtual void compute(const SDR &activeColumns, const bool learn = true); @@ -459,7 +454,7 @@ class TemporalMemory : public Serializable CEREAL_NVP(permanenceIncrement_), CEREAL_NVP(permanenceDecrement_), CEREAL_NVP(predictedSegmentDecrement_), - CEREAL_NVP(extra_), + CEREAL_NVP(externalPredictiveInputs_), CEREAL_NVP(maxSegmentsPerCell_), CEREAL_NVP(maxSynapsesPerSegment_), CEREAL_NVP(iteration_), @@ -515,7 +510,7 @@ class TemporalMemory : public Serializable CEREAL_NVP(permanenceIncrement_), CEREAL_NVP(permanenceDecrement_), CEREAL_NVP(predictedSegmentDecrement_), - CEREAL_NVP(extra_), + CEREAL_NVP(externalPredictiveInputs_), CEREAL_NVP(maxSegmentsPerCell_), CEREAL_NVP(maxSynapsesPerSegment_), CEREAL_NVP(iteration_), @@ -617,7 +612,7 @@ class TemporalMemory : public Serializable Permanence permanenceIncrement_; Permanence permanenceDecrement_; Permanence predictedSegmentDecrement_; - UInt extra_; + UInt externalPredictiveInputs_; SegmentIdx maxSegmentsPerCell_; SynapseIdx maxSynapsesPerSegment_; @@ -639,7 +634,7 @@ class TemporalMemory : public Serializable public: Connections connections; - const UInt &extra = extra_; + const UInt &externalPredictiveInputs = externalPredictiveInputs_; /* * anomaly score computed for the current inputs * (auto-updates after each call to TM::compute()) diff --git a/src/htm/regions/TMRegion.cpp b/src/htm/regions/TMRegion.cpp index 8842407da7..dacf8eb0bb 100644 --- a/src/htm/regions/TMRegion.cpp +++ b/src/htm/regions/TMRegion.cpp @@ -57,7 +57,7 @@ TMRegion::TMRegion(const ValueMap ¶ms, Region *region) args_.maxSynapsesPerSegment = params.getScalarT("maxSynapsesPerSegment", 255); args_.checkInputs = params.getScalarT("checkInputs", true); args_.orColumnOutputs = params.getScalarT("orColumnOutputs", false); - args_.extra = 0; // will be obtained from extra inputs dimensions. + args_.externalPredictiveInputs = 0; // will be obtained from externalPredictiveInputs inputs dimensions. // variables used by this class and not passed on args_.learningMode = params.getScalarT("learningMode", true); @@ -140,23 +140,25 @@ void TMRegion::initialize() { << ") does not match the configured value for 'numberOfCols' (" << args_.numberOfCols << ")."; - // Look for extra data + // Look for externalPredictiveInputs data // This can come from anywhere and have any size. The only restriction is - // that the buffer width of extraWinners must be the same as buffer width of extraActive. - // The extraWinners on bits should be a subset of on bits in extraWinners. - args_.extra = 0; - in = region_->getInput("extraActive"); + // that the buffer width of externalPredictiveInputsWinners must be the same + // as buffer width of externalPredictiveInputsActive. + // The externalPredictiveInputsWinners on bits should be a subset of on bits + // in externalPredictiveInputsWinners. + args_.externalPredictiveInputs = 0; + in = region_->getInput("externalPredictiveInputsActive"); if (in && in->hasIncomingLinks()) { - args_.extra = (UInt32)in->getDimensions().getCount(); + args_.externalPredictiveInputs = (UInt32)in->getDimensions().getCount(); NTA_ASSERT(in->getData().getType() == NTA_BasicType_SDR); - in = region_->getInput("extraWinners"); + in = region_->getInput("externalPredictiveInputsWinners"); NTA_ASSERT(in->getData().getType() == NTA_BasicType_SDR); NTA_CHECK(in && in->hasIncomingLinks() - && args_.extra == in->getDimensions().getCount()) - << "The input 'extraActive' (width: " << args_.extra - << ") is connected but 'extraWinners' input " + && args_.externalPredictiveInputs == in->getDimensions().getCount()) + << "The input 'externalPredictiveInputsActive' (width: " << args_.externalPredictiveInputs + << ") is connected but 'externalPredictiveInputsWinners' input " << "is not provided OR it has a different buffer size."; } @@ -167,7 +169,7 @@ void TMRegion::initialize() { args_.initialPermanence, args_.connectedPermanence, args_.minThreshold, args_.maxNewSynapseCount, args_.permanenceIncrement, args_.permanenceDecrement, args_.predictedSegmentDecrement, args_.seed, args_.maxSegmentsPerCell, - args_.maxSynapsesPerSegment, args_.checkInputs, args_.extra); + args_.maxSynapsesPerSegment, args_.checkInputs, args_.externalPredictiveInputs); tm_.reset(tm); args_.iter = 0; @@ -199,19 +201,19 @@ void TMRegion::compute() { NTA_ASSERT(bottomUpIn.getType() == NTA_BasicType_SDR); SDR& activeColumns = bottomUpIn.getSDR(); - // Check for 'extra' inputs + // Check for 'externalPredictiveInputs' inputs static SDR nullSDR({0}); - Array &extraActive = getInput("extraActive")->getData(); - SDR& extraActiveCells = (args_.extra) ? (extraActive.getSDR()) : nullSDR; + Array &externalPredictiveInputsActive = getInput("externalPredictiveInputsActive")->getData(); + SDR& externalPredictiveInputsActiveCells = (args_.externalPredictiveInputs) ? (externalPredictiveInputsActive.getSDR()) : nullSDR; - Array &extraWinners = getInput("extraWinners")->getData(); - SDR& extraWinnerCells = (args_.extra) ? (extraWinners.getSDR()) : nullSDR; + Array &externalPredictiveInputsWinners = getInput("externalPredictiveInputsWinners")->getData(); + SDR& externalPredictiveInputsWinnerCells = (args_.externalPredictiveInputs) ? (externalPredictiveInputsWinners.getSDR()) : nullSDR; NTA_DEBUG << "compute " << *in << std::endl; // Perform Bottom up compute() - tm_->compute(activeColumns, args_.learningMode, extraActiveCells, extraWinnerCells); + tm_->compute(activeColumns, args_.learningMode, externalPredictiveInputsActiveCells, externalPredictiveInputsWinnerCells); args_.sequencePos++; @@ -484,10 +486,10 @@ Spec *TMRegion::createSpec() { true // isDefaultInput )); ns->inputs.add( - "extraActive", + "externalPredictiveInputsActive", InputSpec("External extra active bits from an external source. " "These can come from anywhere and be any size. If provided, " - "the 'extra' flag is set to dense buffer size and both " + "the 'externalPredictiveInputs' flag is set to dense buffer size and both " "extraActive and extraWinners must be provided and have the" "same dense buffer size. Dimensions are set by source.", NTA_BasicType_SDR, // type @@ -497,10 +499,10 @@ Spec *TMRegion::createSpec() { false // isDefaultInput )); ns->inputs.add( - "extraWinners", + "externalPredictiveInputsWinners", InputSpec("The winning active bits from an external source. " "These can come from anywhere and be any size. If provided, " - "the 'extra' flag is set to dense buffer size and both " + "the 'externalPredictiveInputs' flag is set to dense buffer size and both " "extraActive and extraWinners must be provided and have the" "same dense buffer size. Dimensions are set by source.", NTA_BasicType_SDR, // type @@ -828,7 +830,7 @@ bool TMRegion::operator==(const RegionImpl &o) const { if (args_.seed != other.args_.seed) return false; if (args_.maxSegmentsPerCell != other.args_.maxSegmentsPerCell) return false; if (args_.maxSynapsesPerSegment != other.args_.maxSynapsesPerSegment) return false; - if (args_.extra != other.args_.extra) return false; + if (args_.externalPredictiveInputs != other.args_.externalPredictiveInputs) return false; if (args_.checkInputs != other.args_.checkInputs) return false; if (args_.learningMode != other.args_.learningMode) return false; if (args_.sequencePos != other.args_.sequencePos) return false; diff --git a/src/htm/regions/TMRegion.hpp b/src/htm/regions/TMRegion.hpp index aecd0536ff..905a04cfe1 100644 --- a/src/htm/regions/TMRegion.hpp +++ b/src/htm/regions/TMRegion.hpp @@ -77,7 +77,7 @@ class TMRegion : public RegionImpl, Serializable { ar(cereal::make_nvp("seed", args_.seed)); ar(cereal::make_nvp("maxSegmentsPerCell", args_.maxSegmentsPerCell)); ar(cereal::make_nvp("maxSynapsesPerSegment", args_.maxSynapsesPerSegment)); - ar(cereal::make_nvp("extra", args_.extra)); + ar(cereal::make_nvp("externalPredictiveInputs", args_.externalPredictiveInputs)); ar(cereal::make_nvp("checkInputs", args_.checkInputs)); ar(cereal::make_nvp("learningMode", args_.learningMode)); ar(cereal::make_nvp("sequencePos", args_.sequencePos)); @@ -106,7 +106,7 @@ class TMRegion : public RegionImpl, Serializable { ar(cereal::make_nvp("seed", args_.seed)); ar(cereal::make_nvp("maxSegmentsPerCell", args_.maxSegmentsPerCell)); ar(cereal::make_nvp("maxSynapsesPerSegment", args_.maxSynapsesPerSegment)); - ar(cereal::make_nvp("extra", args_.extra)); + ar(cereal::make_nvp("externalPredictiveInputs", args_.externalPredictiveInputs)); ar(cereal::make_nvp("checkInputs", args_.checkInputs)); ar(cereal::make_nvp("learningMode", args_.learningMode)); ar(cereal::make_nvp("sequencePos", args_.sequencePos)); @@ -168,7 +168,7 @@ class TMRegion : public RegionImpl, Serializable { Int32 seed; Int32 maxSegmentsPerCell; Int32 maxSynapsesPerSegment; - UInt32 extra; + UInt32 externalPredictiveInputs; bool checkInputs; // parameters used by this class and not passed on