Closed Thanh-Binh closed 5 years ago
HI @Thanh-Binh , can you provide a small running test? I'll try to fix that in https://github.com/htm-community/nupic.cpp
@breznak I will have an idea for running test... and provide it soon ...
In the meantime after analysing the codes in SparseMatrix.hpp, I found out that the size of the input "overlap" for computeActivity() should be initialized by the current number of synapses for all segments, exactly by calling matrix.nRows(), because it will be changed after calling createSegments(), and growSynapsesForSample(). Now it works correctly, and the debug time helps me to understand better the nupic codes ... so that I can close this ... Thanks again to Mark....
Hi all, I am using SparseMatrixConnections for createSegment() and after that for growSynapsesToSample() like
It crashes when the size of new segments > 1 because the pointer of newSegments is increased in the function createSegments(), so that by finishing test(), the program tries to destruct the vector and get an error like: free(): invalid pointer.
Do you have any idea for solving this problem? Thanks