What is the output you're seeing in the other shell, the one that is running 
nupic.cerebro2.server?

On Mon, Oct 27, 2014 at 10:17 PM, Mika Schiller <[email protected]>
wrote:

> Attached is the output I'm seeing
> On Tue, Oct 28, 2014 at 1:05 AM, Chetan Surpur <[email protected]> wrote:
>> When you visit the page in your browser, do you see any output from the
>> shell running the server?
>>
>>
>>
>> On Mon, Oct 27, 2014 at 10:01 PM, Mika Schiller <[email protected]>
>> wrote:
>>
>>> I see the same
>>>
>>> http://0.0.0.0:8080/
>>>
>>> Then when I run python -m SimpleHTTPServer 8000 in nupic.cerebro2/static I
>>> see
>>>
>>>  Serving HTTP on 0.0.0.0 port 8000 ...
>>>
>>> On Tue, Oct 28, 2014 at 12:52 AM, Chetan Surpur <[email protected]>
>>> wrote:
>>>
>>>> In nupic.cerebro2.server, when you run `python server.py`, what do you
>>>> see? I see this:
>>>>
>>>>  ยป python server.py
>>>> http://0.0.0.0:8080/
>>>>
>>>>
>>>>
>>>> On Mon, Oct 27, 2014 at 9:41 PM, Mika Schiller <[email protected]>
>>>> wrote:
>>>>
>>>>>  I pulled the latest code, but still no simulation visible as
>>>>> screenshot shows. Javascript console attached also. Here are the steps I'm
>>>>> following:
>>>>>
>>>>> 1) Run Patcher().patchSP(sp)and then sp.compute()  for 20 learning
>>>>> iterations
>>>>>
>>>>> 2) cd into nupic.cerebro2.server and run python server.py
>>>>>
>>>>> 3) cd into nupic.cerebro2/static and run python -m SimpleHTTPServer
>>>>> 8000
>>>>>
>>>>> On Mon, Oct 27, 2014 at 11:56 PM, Chetan Surpur <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Actually, I just resolved that issue and merged. If you pull the
>>>>>> latest code and try again, it should work.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Oct 27, 2014 at 8:50 PM, Chetan Surpur <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Mika,
>>>>>>>
>>>>>>> In nupic.cerebro2.server, did you run `python server.py 9090`?
>>>>>>>
>>>>>>> See this issue: https://github.com/numenta/nupic.cerebro2/issues/65
>>>>>>>
>>>>>>> - Chetan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Oct 27, 2014 at 8:11 PM, Mika Schiller <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Chetan, the code runs fine now, though there is still no simulation
>>>>>>>> showing at http://localhost:8000/
>>>>>>>>
>>>>>>>> I've attached a screenshot of my javascript console. Seems it might
>>>>>>>> be related to a javascript issue.
>>>>>>>>
>>>>>>>> On Mon, Oct 27, 2014 at 8:25 PM, Chetan Surpur <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Mika,
>>>>>>>>>
>>>>>>>>> I just merged a PR [1] that should resolve this issue. Please
>>>>>>>>> update and try it again.
>>>>>>>>>
>>>>>>>>> [1] https://github.com/numenta/nupic.cerebro2.server/pull/14
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Chetan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Oct 27, 2014 at 4:25 PM, Mika Schiller <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Woops, accidentally hit send. Here is the corrected code to run
>>>>>>>>>> the patched sp
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  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)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>  Patcher().patchSP(sp)
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> #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)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> On Mon, Oct 27, 2014 at 5:35 PM, Matthew Taylor <[email protected]>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Mika, did Chetan's tip to patch the SP before running Cerebro fix
>>>>>>>>>>> your problem?
>>>>>>>>>>> ---------
>>>>>>>>>>> Matt Taylor
>>>>>>>>>>> OS Community Flag-Bearer
>>>>>>>>>>> Numenta
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Oct 20, 2014 at 9:15 PM, Chetan Surpur <
>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>> > Ah, so you have to patch the SP
>>>>>>>>>>> > before
>>>>>>>>>>> >  you run it.
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> > 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-27 at 11.04.26 PM.png>
>>>>>>>
>>>>>>>
>>>>>>> <Screen Shot 2014-10-27 at 11.04.26 PM.png>
>>>>>>
>>>>>>
>>>>>>
>>>>>  <Screen Shot 2014-10-28 at 12.37.12 AM.png><Screen Shot 2014-10-28 at
>>>>> 12.40.11 AM.png>
>>>>
>>>>
>>>>
>>>
>>

Reply via email to