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

Strange SP initial connections #68

Closed alior101 closed 5 years ago

alior101 commented 5 years ago

I think - (but I'm not 100% sure) that there is a bug in the SP initial connection tensor.. I'm still trying to understand why, but for example1, for example, each of the 128 output cells is making connections only to 1-32 first input cells. I was expecting 32 * 0.75 random connections receptive field from the entire 128 input population. Am I missing something ?

in spatialpooler init I'm printing the connections as in connections_.view(write_loc) = Tensor({(intmax_t)potential_pool_size}, conns.data()); std::cout << "Connections_ for cell " << i << " are " << Tensor({(intmax_t)potential_pool_size}, conns.data()) << std::endl; and this is what I get

Connections_ for cell 0 are { 3 , 4 , 5 , 6 , 8 , 10, 11, 12, 14, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 1 are { 0 , 1 , 2 , 3 , 4 , 5 , 8 , 9 , 10, 11, 12, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28, 30} Connections_ for cell 2 are { 0 , 2 , 3 , 4 , 5 , 7 , 8 , 9 , 10, 11, 12, 13, 14, 16, 17, 18, 19, 21, 23, 24, 25, 26, 28, 30} Connections_ for cell 3 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 11, 12, 17, 18, 19, 20, 22, 23, 24, 27, 28, 29, 30, 31} Connections_ for cell 4 are { 0 , 1 , 2 , 4 , 5 , 7 , 8 , 9 , 10, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 30, 31} Connections_ for cell 5 are { 0 , 1 , 2 , 4 , 5 , 6 , 7 , 9 , 12, 13, 14, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 31} Connections_ for cell 6 are { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 24, 26, 27, 29, 30} Connections_ for cell 7 are { 0 , 1 , 2 , 3 , 6 , 8 , 9 , 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 31} Connections_ for cell 8 are { 0 , 1 , 3 , 4 , 5 , 6 , 7 , 8 , 10, 11, 13, 14, 15, 16, 17, 19, 20, 22, 24, 26, 27, 28, 29, 30} Connections_ for cell 9 are { 0 , 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10, 12, 15, 16, 17, 18, 19, 20, 22, 23, 24, 26, 27, 29, 30} Connections_ for cell 10 are { 0 , 1 , 2 , 3 , 4 , 8 , 9 , 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 26, 28, 29, 30, 31} Connections_ for cell 11 are { 0 , 2 , 3 , 4 , 7 , 9 , 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 22, 23, 25, 26, 27, 28, 29, 30} Connections_ for cell 12 are { 1 , 2 , 3 , 4 , 7 , 8 , 9 , 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 30, 31} Connections_ for cell 13 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 11, 13, 15, 16, 17, 18, 19, 21, 23, 24, 27, 29, 30, 31} Connections_ for cell 14 are { 0 , 1 , 2 , 3 , 5 , 6 , 7 , 8 , 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 27, 28, 31} Connections_ for cell 15 are { 3 , 4 , 6 , 7 , 8 , 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 16 are { 0 , 1 , 2 , 3 , 4 , 5 , 7 , 8 , 10, 11, 12, 13, 14, 16, 17, 18, 19, 21, 23, 24, 25, 27, 30, 31} Connections_ for cell 17 are { 0 , 3 , 4 , 5 , 6 , 7 , 8 , 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 24, 26, 29, 30, 31} Connections_ for cell 18 are { 0 , 2 , 5 , 6 , 7 , 8 , 9 , 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31} Connections_ for cell 19 are { 0 , 1 , 2 , 3 , 5 , 6 , 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 24, 25, 27, 28, 29, 30, 31} Connections_ for cell 20 are { 0 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 10, 11, 12, 13, 14, 16, 17, 21, 22, 24, 26, 27, 28, 29, 30, 31} Connections_ for cell 21 are { 0 , 2 , 3 , 4 , 5 , 6 , 7 , 9 , 10, 11, 12, 13, 14, 17, 20, 21, 22, 24, 25, 26, 28, 29, 30, 31} Connections_ for cell 22 are { 0 , 1 , 3 , 4 , 5 , 6 , 7 , 8 , 10, 11, 12, 14, 15, 16, 17, 19, 21, 22, 25, 26, 27, 28, 29, 31} Connections_ for cell 23 are { 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10, 12, 13, 14, 16, 18, 19, 20, 21, 22, 24, 25, 28, 29, 30, 31} Connections_ for cell 24 are { 0 , 1 , 4 , 5 , 6 , 8 , 9 , 10, 11, 14, 15, 16, 17, 18, 19, 21, 22, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 25 are { 0 , 1 , 2 , 3 , 5 , 7 , 8 , 9 , 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 23, 25, 26, 27, 28, 31} Connections_ for cell 26 are { 1 , 3 , 4 , 6 , 8 , 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31} Connections_ for cell 27 are { 0 , 1 , 2 , 3 , 7 , 8 , 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 28, 30, 31} Connections_ for cell 28 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 9 , 10, 11, 12, 14, 15, 17, 18, 19, 20, 21, 22, 24, 26, 28, 30} Connections_ for cell 29 are { 0 , 1 , 2 , 3 , 6 , 7 , 8 , 9 , 10, 11, 13, 14, 16, 17, 18, 19, 20, 21, 22, 25, 26, 28, 29, 30} Connections_ for cell 30 are { 0 , 1 , 2 , 3 , 4 , 8 , 9 , 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 30} Connections_ for cell 31 are { 0 , 1 , 2 , 4 , 5 , 6 , 7 , 8 , 9 , 11, 12, 14, 15, 16, 17, 18, 20, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 32 are { 2 , 3 , 4 , 6 , 7 , 8 , 10, 12, 13, 14, 16, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 33 are { 0 , 1 , 2 , 3 , 6 , 7 , 8 , 9 , 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 26, 27, 28, 29} Connections_ for cell 34 are { 1 , 3 , 5 , 8 , 9 , 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 35 are { 0 , 1 , 3 , 4 , 5 , 7 , 9 , 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 27, 28, 29, 31} Connections_ for cell 36 are { 0 , 1 , 2 , 4 , 5 , 6 , 8 , 9 , 10, 11, 12, 13, 14, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28} Connections_ for cell 37 are { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 24, 26, 28, 31} Connections_ for cell 38 are { 0 , 1 , 2 , 4 , 5 , 6 , 9 , 10, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 30, 31} Connections_ for cell 39 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 10, 11, 12, 14, 16, 17, 18, 19, 21, 22, 24, 25, 26, 29, 30, 31} Connections_ for cell 40 are { 0 , 1 , 2 , 4 , 5 , 6 , 7 , 8 , 10, 12, 14, 15, 16, 17, 18, 20, 21, 22, 23, 26, 27, 28, 29, 30} Connections_ for cell 41 are { 0 , 2 , 3 , 6 , 7 , 8 , 9 , 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 25, 28, 29, 30, 31} Connections_ for cell 42 are { 0 , 1 , 2 , 4 , 5 , 6 , 8 , 9 , 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 26, 28, 31} Connections_ for cell 43 are { 1 , 2 , 3 , 5 , 6 , 9 , 10, 11, 12, 14, 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 44 are { 0 , 1 , 2 , 3 , 4 , 7 , 8 , 9 , 11, 13, 14, 15, 17, 18, 20, 22, 23, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 45 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 10, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 24, 26, 27, 28, 29} Connections_ for cell 46 are { 0 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11, 12, 13, 15, 16, 18, 20, 21, 22, 23, 25, 26, 27, 28, 30} Connections_ for cell 47 are { 0 , 1 , 2 , 3 , 5 , 6 , 7 , 8 , 9 , 12, 15, 16, 17, 18, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 48 are { 0 , 1 , 2 , 3 , 4 , 5 , 7 , 8 , 9 , 10, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 31} Connections_ for cell 49 are { 0 , 3 , 4 , 6 , 7 , 9 , 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31} Connections_ for cell 50 are { 1 , 3 , 4 , 6 , 7 , 10, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31} Connections_ for cell 51 are { 0 , 1 , 2 , 3 , 6 , 7 , 8 , 9 , 10, 12, 14, 15, 16, 17, 18, 20, 21, 23, 24, 25, 26, 27, 28, 30} Connections_ for cell 52 are { 0 , 1 , 2 , 5 , 7 , 8 , 9 , 10, 12, 14, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 53 are { 0 , 1 , 2 , 3 , 4 , 7 , 8 , 9 , 10, 11, 13, 15, 16, 17, 19, 20, 22, 24, 25, 27, 28, 29, 30, 31} Connections_ for cell 54 are { 0 , 1 , 2 , 4 , 5 , 6 , 7 , 10, 11, 12, 14, 15, 16, 18, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31} Connections_ for cell 55 are { 0 , 2 , 3 , 4 , 5 , 6 , 8 , 9 , 10, 11, 12, 14, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 28, 30} Connections_ for cell 56 are { 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 28, 29} Connections_ for cell 57 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 9 , 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31} Connections_ for cell 58 are { 0 , 2 , 3 , 6 , 7 , 8 , 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29} Connections_ for cell 59 are { 0 , 2 , 4 , 5 , 6 , 7 , 10, 11, 12, 13, 14, 15, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 30, 31} Connections_ for cell 60 are { 0 , 1 , 2 , 3 , 4 , 5 , 7 , 9 , 11, 12, 13, 14, 15, 19, 20, 21, 22, 23, 24, 26, 27, 29, 30, 31} Connections_ for cell 61 are { 0 , 1 , 5 , 6 , 7 , 8 , 9 , 10, 11, 12, 14, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 31} Connections_ for cell 62 are { 0 , 2 , 3 , 4 , 5 , 7 , 8 , 9 , 10, 11, 12, 14, 15, 17, 20, 21, 23, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 63 are { 1 , 2 , 3 , 4 , 5 , 8 , 9 , 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 27, 28, 29, 30} Connections_ for cell 64 are { 0 , 1 , 2 , 5 , 7 , 8 , 9 , 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31} Connections_ for cell 65 are { 0 , 1 , 2 , 4 , 5 , 6 , 7 , 9 , 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 24, 27, 28, 29, 30} Connections_ for cell 66 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 8 , 10, 11, 12, 13, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 29, 30} Connections_ for cell 67 are { 0 , 1 , 3 , 5 , 6 , 7 , 8 , 9 , 10, 12, 13, 14, 15, 16, 18, 19, 21, 23, 24, 25, 26, 28, 29, 30} Connections_ for cell 68 are { 1 , 2 , 3 , 4 , 5 , 8 , 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 27, 28, 29, 30, 31} Connections_ for cell 69 are { 0 , 1 , 2 , 3 , 5 , 6 , 7 , 8 , 11, 13, 14, 15, 16, 17, 20, 21, 22, 24, 25, 26, 27, 28, 30, 31} Connections_ for cell 70 are { 0 , 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 24, 25, 27, 28, 31} Connections_ for cell 71 are { 0 , 1 , 2 , 4 , 6 , 7 , 8 , 9 , 10, 11, 12, 13, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29} Connections_ for cell 72 are { 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10, 11, 15, 16, 17, 19, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 73 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11, 12, 13, 14, 18, 20, 21, 23, 24, 25, 26, 29, 30} Connections_ for cell 74 are { 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 28, 29} Connections_ for cell 75 are { 0 , 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 10, 11, 13, 14, 16, 17, 19, 20, 21, 22, 24, 25, 27, 29, 30} Connections_ for cell 76 are { 0 , 2 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 25, 26, 27, 28, 29, 30} Connections_ for cell 77 are { 0 , 1 , 2 , 3 , 4 , 5 , 7 , 9 , 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 30, 31} Connections_ for cell 78 are { 0 , 1 , 2 , 3 , 5 , 7 , 8 , 9 , 10, 11, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 24, 26, 30, 31} Connections_ for cell 79 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11, 14, 15, 17, 18, 19, 20, 21, 25, 28, 29, 30, 31} Connections_ for cell 80 are { 0 , 1 , 3 , 4 , 5 , 6 , 7 , 9 , 10, 13, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 28, 30, 31} Connections_ for cell 81 are { 1 , 2 , 3 , 4 , 5 , 6 , 8 , 9 , 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 29, 30, 31} Connections_ for cell 82 are { 1 , 2 , 3 , 4 , 6 , 7 , 9 , 10, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 25, 26, 27, 29, 30, 31} Connections_ for cell 83 are { 1 , 2 , 3 , 4 , 5 , 7 , 8 , 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 31} Connections_ for cell 84 are { 0 , 1 , 3 , 5 , 7 , 9 , 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31} Connections_ for cell 85 are { 0 , 1 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11, 13, 14, 15, 17, 18, 19, 20, 21, 26, 27, 28, 29, 30} Connections_ for cell 86 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 9 , 10, 11, 13, 17, 19, 20, 21, 22, 23, 24, 25, 27, 28, 30, 31} Connections_ for cell 87 are { 1 , 3 , 5 , 6 , 8 , 9 , 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 30, 31} Connections_ for cell 88 are { 0 , 1 , 2 , 5 , 6 , 8 , 10, 11, 12, 13, 14, 15, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31} Connections_ for cell 89 are { 0 , 1 , 2 , 3 , 4 , 5 , 8 , 9 , 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 29, 31} Connections_ for cell 90 are { 0 , 1 , 3 , 5 , 6 , 7 , 8 , 9 , 10, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28} Connections_ for cell 91 are { 2 , 3 , 4 , 5 , 8 , 9 , 10, 11, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 27, 28, 30, 31} Connections_ for cell 92 are { 0 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 11, 12, 13, 14, 16, 17, 18, 20, 21, 22, 23, 24, 25, 27, 28, 29} Connections_ for cell 93 are { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 12, 13, 15, 16, 18, 19, 20, 22, 24, 27, 28, 29, 30, 31} Connections_ for cell 94 are { 0 , 1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28} Connections_ for cell 95 are { 0 , 1 , 2 , 3 , 5 , 8 , 9 , 10, 11, 12, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 27, 28, 29, 30} Connections_ for cell 96 are { 0 , 2 , 3 , 4 , 6 , 7 , 8 , 9 , 11, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 29, 30} input: { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} connections: {{ 24 , -1 , ...., 1 , 0 }, { 21 , 0 , ...., 1.43632e+09 , 21845 }, { 19 , 21845 , ...., 1.43495e+09 , 21845 }, .... { 20 , -1 , ...., 0 , 0 }, { 21 , -1 , ...., 1.43401e+09 , 21845 }, { 20 , 21845 , ...., 1.43478e+09 , 21845 }} permanences: {{ 1 , 3.06114e-41 , ...., 9.95847e+32 , 945.487 }, { 0.484771 , 0 , ...., 1.82847e+13 , 3.06114e-41 }, { 0 , 3.06114e-41 , ...., 2.38172e+13 , 3.06114e-41 }, .... { 0 , 3.06114e-41 , ...., 0 , 0 }, { 0.166686 , 3.06114e-41 , ...., 9.95847e+32 , 949.488 }, { 0.826219 , 0 , ...., 0 , 0 }} terminate called after throwing an instance of 'et::EtError' what(): Cannot find any open-able cellActivity.cl in search paths

marty1885 commented 5 years ago

Maybe this is linked to #49 ? Where the two constructors (one for topology and one not using topology) can be misused easily. May you try the master branch and see weather the problem persists.

The terminate called after throwing an instance of 'et::EtError' what(): Cannot find any open-able cellActivity.cl in search paths indicates that Etaler can't find it's OpenCL kernels in the search path ("./kernels/", "../kernels/", "/usr/local/share/Etaler/kernels/", "/usr/share/Etaler/kernels/"). Where are you running your executable from? And where did you install Etaler?

marty1885 commented 5 years ago

I'm sure this is the SP constructor issue.

Just to proof my point. In example1.cpp. The code says

//Create a SP that takes in 128 input bits and generates 32 bit representation
//setDefaultBackend(std::make_shared<OpenCLBackend>());
SpatialPooler sp({128}, {32});

So there are only 32 cells in the SP, thus cell 96 shouldn't exist. Therefor:

root [0] #pragma cling load("/usr/local/lib/libEtaler.so")
root [1] #include <Etaler/Etaler.hpp>
root [2] #include <Etaler/Algorithms/SpatialPooler.hpp>
root [3] using namespace et;
root [4] sp = SpatialPooler({128}, {32});
root [5] sp.connections_.view({96})
Error in <TRint::HandleTermInput()>: et::EtError caught: Indexing from 96 is out of the range of 32
alior101 commented 5 years ago

you're right. Working now. What's the use case for SP ND version ?

marty1885 commented 5 years ago

The ND stands for N-Dimensional. While the default SP can handle ND inputs - it treats the input SDR and a 1D array, any cell in the SP have a 75% chance to be connected to any given cell in the input SDR, effectively having a infinite size of it's max potential pool. The ND SP implements topology (as described in HTM School ep 10). Limiting the maximum size of the potential pool of a cell. This is more biologically consistent. But I haven't found a use for it.

(Maybe it will be useful in image and audio processing. We'll have to try before knowing)

alior101 commented 5 years ago

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?

On Tue, Aug 13, 2019 at 4:53 PM Martin Chang notifications@github.com wrote:

The ND stands for N-Dimensional. While the default SP can handle ND inputs

  • it treats the input SDR and a 1D array, any cell in the SP have a 75% to be connected to any given cell in the input SDR, effectively having a infinite size of it's max potential pool. The ND SP implements topology (as described in HTM School ep 10 https://www.youtube.com/watch?v=HTW2Q_UrkAw). Limiting the maximum size of the potential pool of a cell. This is more biologically consistent. But I haven't found a use for it.

(Maybe it will be useful in image and audio processing. We'll have to try before knowing)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/etaler/Etaler/issues/68?email_source=notifications&email_token=AAXET3C56U7MVQO7UJGEL6LQEK4HNA5CNFSM4ILJU372YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4FXHQY#issuecomment-520844227, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXET3HMB6DUKHFB42GJUETQEK4HNANCNFSM4ILJU37Q .

marty1885 commented 5 years ago

Yes, in fact I borrow the syntax of a convolution layer from Keras.

I would disagree. The HTM School video shows that even under topology, some cells inside the range (kernel_size in Etaler/ potential_radius in NuPIC) are still not in the potential pool.

HTM School screenshot

marty1885 commented 5 years ago

Ohh... you mean even at Cell 64. the SP is still connecting to Cell 0~31. Yeah, I agree it is a bug.