etaler / Etaler

A flexable HTM (Hierarchical Temporal Memory) framework with full GPU support.
BSD 3-Clause "New" or "Revised" License
89 stars 14 forks source link

Spatial Pooler w Topology having weird connecties #69

Closed marty1885 closed 5 years ago

marty1885 commented 5 years ago

From #68 . Quote alior.

So, if I understand correctly the kernel size is the potential pool size ? If so, I think it should indeed follow a topological connection with input.. For example output cell 0 should have a potential pool of input cells 0-31 while output cell N (the last one) should have a potential pool of 95-127 ... Is that the case ? From my little experiment all output cells are randomly drawn from 0-31 which doesn't make sense biologically since the SP have a receptive field of input cells that are "below" the layers topologically ? What do you think?

marty1885 commented 5 years ago

@alior101 I fixed some problem with SpatialPoolerND. But I can't replicate the issue of cells only connecting to cell 0~31.

int main()
{
    SpatialPoolerND sp({128}, 32);
    std::cout << sp.connections() << std::endl;
}

prints

{{ 3  , 4  , 5  , 6  , 8  , 10 , 11 , ...., 25 , 26 , 27 , 28 , 29 , 30 , 31 }, 
 { 1  , 2  , 3  , 4  , 5  , 6  , 9  , ...., 23 , 25 , 26 , 27 , 28 , 29 , 31 }, 
 { 2  , 4  , 5  , 6  , 7  , 9  , 10 , ...., 23 , 25 , 26 , 27 , 28 , 30 , 32 }, 
 ....
 { 94 , 95 , 96 , 97 , 98 , 100, 101, ...., 115, 116, 118, 119, 120, 121, 122}, 
 { 95 , 96 , 97 , 98 , 100, 103, 104, ...., 118, 119, 120, 122, 123, 124, 125}, 
 { 96 , 98 , 99 , 100, 102, 103, 104, ...., 119, 120, 121, 122, 123, 125, 126}}
alior101 commented 5 years ago

it was with old version.. you probably fixed it already :)

marty1885 commented 5 years ago

Roger that :)