-
Notifications
You must be signed in to change notification settings - Fork 74
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
Try to create iPython online notebook in google Collab #563
Comments
|
I had tried to import matplotlib at the beginning and also via inline versions: both were NOT effective or obtained the same result --> <Figure size 640x480 with 2 Axes> I also had added a simple "print" (print ("Checking matplotlib here") ) statement underneath "import matplotlib.pyplot as plt" and got nothing printed! Can anyone guide me what to do next?! Many thanks. |
I'd suggest first try to run the example locally under this seems the plot works actually, do you need to call something like But overall, this does not seem like issue in htm.core itself. |
I tried the following in a new cell under Colab and it plotted the test chart! Testing of matplotlibimport os import matplotlib.pyplot as plt and it plotted a diagonal line. So why it won't plot in hotgym.py??? |
I don't why it doesn't work. It works for me on my computer. From your description it sounds like an issue with matplotlib. Here is a stack-overflow link which might describe your issue? Maybe you could try changing the line |
@cyberslam would you describe your steps to install htm.core in google colab? |
Sorry for "stealing" the issue, but with the information, I'll turn this into an optional "HTM on Collab" issue. |
Hi Ben, Sorry to tell you that I was unable to install the htm.core under colab.Cheers,Samuel ~Sent from my Samsung Galaxy smartphone.
|
Thanks for the message.
ok, this will be easily possible once we get to pip installable package #19 |
@indy-3rdman moving the iPython online demo/notebook here Exactly! This is pretty sweet! 💯 I'd definitely love that notebook in our now one thing, you have it already running in docker/binder. Does that require you to manually maintain/build the docker image, or is it built on the fly from master? Since we now can easily install releases from |
@breznak, that was just a quick POC using the existing image, which also runs the rest_server needed for the C# examples anyway. I might be wrong, but I think the binder related files need to be either on the root level or in the binder directory for it to work. Would that be a problem? The docker image build is not yet fully automated, but that's on my agenda anyway. I just don't know, when I'll have the time to dig into it. Hope that's OK. |
this is ok 👍
I see, you're using that for the c# bindings (using REST API) hence you need the c++ build -> docker image, right?
|
@breznak, I've changed it to use the latest whl from test.pypi.org. As you will notice, it is automatically creating a docker image from the whole repository now, including all the repository files. This makes me wonder, whether it would make more sense to have the notebooks in a separate repository anyway.... What do you think? |
@breznak, an example of how it would look like as separate repository: https://github.com/indy-3rdman/htm.core-jupyter |
When running under Google Colab using the following command:
"!python3 -m htm.examples.hotgym"
The following was the print-out (no error) but no plot at the end:
Parameters:
{ 'enc': {'resolution': 0.88, 'size': 700, 'sparsity': 0.02},
'sdrc_alpha': 0.1,
'sp': { 'boostStrength': 3.0,
'columnCount': 1638,
'numActiveColumnsPerInhArea': 72,
'potentialPct': 0.85,
'synPermActiveInc': 0.04,
'synPermConnected': 0.13999999999999999,
'synPermInactiveDec': 0.006},
'time': {'timeOfDay': (30, 1), 'weekend': 21},
'tm': { 'activationThreshold': 17,
'cellsPerColumn': 13,
'initialPerm': 0.21,
'maxSegmentsPerCell': 128,
'maxSynapsesPerSegment': 64,
'minThreshold': 10,
'newSynapseCount': 32,
'permanenceDec': 0.1,
'permanenceInc': 0.1}}
Encoded Input SDR( 11765 )
Sparsity Min/Mean/Std/Max 0.00543986 / 0.00552255 / 1.35811e-05 / 0.00552486
Activation Frequency Min/Mean/Std/Max 0 / 0.00552295 / 0.0317386 / 0.502847
Entropy 0.635806
Overlap Min/Mean/Std/Max 0.307692 / 0.891246 / 0.126693 / 1
Spatial Pooler Mini-Columns SDR( 1638 )
Sparsity Min/Mean/Std/Max 0.043956 / 0.0439559 / 2.08729e-07 / 0.043956
Activation Frequency Min/Mean/Std/Max 0.0170804 / 0.0439561 / 0.0182792 / 0.10066
Entropy 0.979711
Overlap Min/Mean/Std/Max 0 / 0.846308 / 0.256087 / 1
Spatial Pooler Connections:
Inputs (11765) ~> Outputs (1638) via Segments (1638)
Segments on Cell Min/Mean/Max 1 / 1 / 1
Potential Synapses on Segment Min/Mean/Max 10000 / 10000 / 10000
Connected Synapses on Segment Min/Mean/Max 86 / 395.876 / 2454
Synapses Dead (0.913949%) Saturated (0.00240562%)
Temporal Memory Cells SDR( 21294 )
Sparsity Min/Mean/Std/Max 0.00338123 / 0.0123309 / 0.013492 / 0.043956
Activation Frequency Min/Mean/Std/Max 0.00204964 / 0.012331 / 0.00762384 / 0.0594398
Entropy 0.968392
Overlap Min/Mean/Std/Max 0 / 0.609997 / 0.381052 / 1
Temporal Memory Connections:
Inputs (17335) ~> Outputs (21294) via Segments (41695)
Segments on Cell Min/Mean/Max 0 / 1.95806 / 11
Potential Synapses on Segment Min/Mean/Max 32 / 36.8715 / 64
Connected Synapses on Segment Min/Mean/Max 28 / 34.0534 / 64
Synapses Dead (0%) Saturated (0.283736%)
Predictive Error (RMS) 1 steps ahead: 18.07927468676872
Predictive Error (RMS) 5 steps ahead: 22.10117101589806
Anomaly Mean 0.2099781116136428
Anomaly Std 0.3366711792821944
<Figure size 640x480 with 2 Axes>
I had tried to put an inline comand: "%matplotlib inline"
underneath "import matplotlib.pyplot as plt", but got the same result
same result: (no plot)
.....
<Figure size 640x480 with 2 Axes>
Please help!
The text was updated successfully, but these errors were encountered: