From 2c0bdc045554a8c1e42ff9cca8ac37a0ba9cef13 Mon Sep 17 00:00:00 2001 From: Marek Otahal Date: Thu, 11 Jan 2018 15:17:10 +0100 Subject: [PATCH] SP check: WIP auto set input to SP input dimensions --- src/nupic/algorithms/SpatialPooler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nupic/algorithms/SpatialPooler.cpp b/src/nupic/algorithms/SpatialPooler.cpp index 52adf3edb2..98faf663b4 100644 --- a/src/nupic/algorithms/SpatialPooler.cpp +++ b/src/nupic/algorithms/SpatialPooler.cpp @@ -490,7 +490,8 @@ const vector& SpatialPooler::getBoostedOverlaps() const /** helper method that checks SP output is stable for given configuration */ bool checkUnstableParams_(SpatialPooler &sp) { - vector input = { 1, 1, 0, 0, 1, 1, 0, 0, 1, 1}; + vector input = {1,1,0,0,1,0}; //FIXME auto to size of SP's input + if(sp.getInputDimensions().size()>1) return true; //FIXME skip nD as I cannot set auto input correctly vector out1(sp.getNumColumns(), 0); vector out2(sp.getNumColumns(), 0); sp.compute(input.data(), true, out1.data());