Possible Simplified implementation of Grid cells layer

Yes, you can create an encoder for a scalar value (integer or real) that is based on the modulo operation. Primes are not required for the module widths, but they do give the greatest number of unique representations for a given number of representational bits. (More details.)

One of the design constraints for my implementation was constant sparsity (all numbers needed to have the same number of on-bits). This allows the encoding to be used directly as an input SDR in an HTM network.

1 Like