Skip to content

Commit b080249

Browse files
committed
Merge pull request #333 from chelu/different-size-layer
Fix computing flat index in SpatialPooler#getNeighborsND
2 parents 3d09828 + 9925ef9 commit b080249

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/numenta/nupic/algorithms/SpatialPooler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ public TIntArrayList getNeighborsND(Connections c, int columnIndex, SparseMatrix
784784
TIntArrayList neighbors = new TIntArrayList(neighborList.size());
785785
int size = neighborList.size();
786786
for(int i = 0;i < size;i++) {
787-
int flatIndex = c.getInputMatrix().computeIndex(neighborList.get(i), false);
787+
int flatIndex = topology.computeIndex(neighborList.get(i), false);
788788
if(flatIndex == columnIndex) continue;
789789
neighbors.add(flatIndex);
790790
}

0 commit comments

Comments
 (0)