I converted the encoder objects to"uint32" numpy arrays and it works now. Thanks.
On Mon, Jan 5, 2015 at 1:54 PM, Matthew Taylor <[email protected]> wrote: > Are you sure the numpy array type you're using is "uint32"? > --------- > Matt Taylor > OS Community Flag-Bearer > Numenta > > > On Thu, Jan 1, 2015 at 8:47 PM, Mika Schiller <[email protected]> > wrote: > > Hey guys, > > > > I'm trying to test out different parameters on the temporal pooler. I > > created a tp and tried feeding it a super simple sequence to learn with > data > > from a scalar encoder: > > > > # create input vectors > > encoder = ScalarEncoder(n=22, w=3, minval=2, maxval=100, clipInput=True, > > forced=True) > > one_input = encoder.encode(1) > > fifteen_input = encoder.encode(15) > > twentyfive_input = encoder.encode(25) > > inputs = (one_input, fifteen_input, twentyfive_input) > > > > > > # send sequence to the temporal pooler for learning > > # repeat the sequence 10 times > > for i in range(10): > > > > for j in range(3): > > > > tp.compute(inputs[j], enableLearn = True, computeInfOutput = > False) > > > > > > But I get an the following error: > > > > tp.compute(inputs[j], enableLearn = True, computeInfOutput = False) > > > > File > > > "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nupic-0.1.0-py2.7.egg/nupic/research/TP10X2.py", > > line 299, in compute > > > > (bottomUpInput.dtype == numpy.dtype('int32')) > > > > AssertionError > > > > > > I'm a bit confused about why it's producing this error because the > encoder > > values I'm feeding the tp are numpy arrays.... > >
