Attached is the output to terminal


On Mon, Oct 20, 2014 at 7:20 PM, Chetan Surpur <[email protected]> wrote:

> Did you run the patched model before you opened Cerebro 2?
>
>
>
> On Mon, Oct 20, 2014 at 4:20 PM, Mika Schiller <[email protected]>
> wrote:
>
>> Strange. I don't see a /tmp directory anywhere. What directory should it
>> be in? I've attached a screenshot of my javascript console when I run the
>> page.
>>
>>
>>
>> On Mon, Oct 20, 2014 at 6:55 PM, Chetan Surpur <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> Is there anything in the cerebro2 directory in /tmp? Also, can you post
>>> what you see in the Javascript console in your browser?
>>>
>>> - Chetan
>>>
>>>
>>>
>>> On Sun, Oct 19, 2014 at 4:12 PM, Mika Schiller <[email protected]>
>>> wrote:
>>>
>>>>   I'm trying to make the sp learn an input 20 times as you can see in
>>>> the code below. First I go into nupic.cerebro2.server directory and run 
>>>> python
>>>> server.py 9090. Then I go into nupic.cerebro2 directory, then /static
>>>> and then run python -m SimpleHTTPServer 8000. When I go to
>>>> http://localhost:8000/ I see the display, but no cells or anything.
>>>> I've attached a screenshot of what I'm seeing. Any idea what might be going
>>>> on here? Did I patch the sp correctly? Thanks!
>>>>
>>>>
>>>>> from nupic.encoders import ScalarEncoder
>>>>>
>>>>> from nupic.research.spatial_pooler import SpatialPooler
>>>>>
>>>>> import numpy
>>>>>
>>>>> from patcher import Patcher
>>>>>
>>>>>
>>>>>> #create an encoder
>>>>>
>>>>> encoder = ScalarEncoder(n=22, w=3, minval=2.5, maxval=97.5,
>>>>>> clipInput=True, forced=True)
>>>>>
>>>>>
>>>>>> #create a spatial pooler
>>>>>
>>>>> sp = SpatialPooler(inputDimensions=(22),
>>>>>
>>>>> columnDimensions=(4,), potentialRadius=22,
>>>>>> numActiveColumnsPerInhArea=1,
>>>>>
>>>>> globalInhibition=True, synPermActiveInc=0.03, potentialPct=1.0)
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> #make sp learn input 20 times
>>>>>
>>>>> output = numpy.zeros((4,), dtype='int')
>>>>>
>>>>> for _ in xrange(20):
>>>>>
>>>>>     sp.compute(encoder.encode(1), learn=True, activeArray=output)
>>>>>
>>>>>
>>>>
>>>>>
>>>>>
>>>>>  if __name__ == "__main__":
>>>>>>
>>>>>
>>>>>
>>>>>    Patcher().patchSP(sp)
>>>>>
>>>>>
>>>>   <Screen Shot 2014-10-19 at 7.08.50 PM.png>
>>>
>>>
>>>
>> <Screen Shot 2014-10-20 at 7.15.59 PM.png>
>
>
>

Reply via email to