Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoders' output is incompatible with the C++ SpatialPooler #3403

Open
mrcslws opened this issue Nov 4, 2016 · 1 comment
Open

Encoders' output is incompatible with the C++ SpatialPooler #3403

mrcslws opened this issue Nov 4, 2016 · 1 comment

Comments

@mrcslws
Copy link
Contributor

mrcslws commented Nov 4, 2016

Using the C++ SpatialPooler, calling SpatialPooler.compute(encoder.encode(42)) will quietly do the very wrong thing because it's given a buffer of 8-bit integers and it thinks it's getting a buffer of 32-bit integers. See: https://discourse.numenta.org/t/inconsistency-between-spatialpooler-in-nupic-and-nupic-bindings/1549/10?u=mrcslws

I think this line should be changed to use numpy.uint32: https://github.com/numenta/nupic/blob/6924a904644bbb8cdba6ca7a62050cf8456614f8/src/nupic/encoders/base.py#L30

Anyone who wants encoders to use fewer bits can explicitly use encodeIntoArray. For encode, we should use a default that works with the SpatialPooler.

@breznak
Copy link
Member

breznak commented May 16, 2017

Related C++ issue numenta/nupic.core-legacy#961

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants