Where is the sensorimotor code?

Hi mrcslws,

thanks a lot for the links!

Excuse my delay too. It seems I erased the email by mistake without being aware of your reply. Then when I entered to the forum to re-check the topic I found this great surprise!

Thanks you very much.

Best,

Dario

@jacobeverist check out htmresearch/frameworks/layers/l2_l4_inference.py and all the files using it:

~/nta/htmresearch  (master)
$ git grep -n l2_l4_inference
...

especially htmresearch/projects/l2_pooling/infer_hand_crafted_objects.py. Cheers.

A post was split to a new topic: Free will Volition module

Can I get some hints on how to get the htmresearch repo installed and working? I’ve been trying with no success. I thought I should build htmresearch_core, then nupic, then htmresearch based on a comment from Austin a while back. It seems my problem lies with htmresearch_core, I can’t import things from it in the python interpreter (e.g., from htmresearch_core import algorithms fails) even though I followed the ‘install from sources’ instructions and the install appeared successful. Oddly if I say help(htmresearch_core) the package only contains:

dummy proto (package)

(and from htmresearch_core import proto works)

I know htmresearch installation isn’t supported but maybe I can bribe people with a delicious lunch or dinner offer on me. think about it folks :wink:

@mccall.ryan - htmresearch-core now just provides the research-related code so it should be installed alongside nupic.bindings. So nupic.bindings.* will come from the nupic.bindings package but no longer have the “nupic.bindings.experimental” extension. That will be in the htmresearch_core namespace.

1 Like

that’s helpful and does clear things up. the problem I’m having now is that this htmresearch-core somehow hasn’t installed properly? (from the looks of it) b/c I can’t import from it. Followed the htmresearch-core README:

pip install -r bindings/py/requirements.txt --user pip install pycapnp==0.5.8 python setup.py install --user python

>>> from htmresearch_core.experimental import ExtendedTemporalMemory
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named experimental

Perhaps I should follow the Developer Installation instead of the simple installation…

@mccall.ryan Did you have any success?

Hi Thanh Binh, I tried installing htmresearch-core the pip way and also the developer way by building c++. Both ways appeared to work successfully but I cannot import things from htmresearch_core that htmresearch depends on, e.g., I couldn’t import ExtendedTemporalMemory. Maybe the readme is incomplete since it looks like a copy of the nupic-core readme and I have to change some arguments to adapt the instructions to htmresearch_core.

I have the same problems like you. I try different ways without any success. Could you, Numenta guys, please help us?

@mccall.ryan @thanh-binh.to I will be able to help within the next few months. I will be running SMI code for upcoming HTM School episodes. I’ll make sure there are clear instructions for installation and running some examples. But it will not be right away.

1 Like

@rhyolight thanks, but i really need 2 things: 1) how is the python path in your laptop? 2) in which py-file is ExtendedTemporalMemory implemented? In nupic/bindings/experimental.py ?
@mrcslws @rhyolight can you give me those information?

We can do some tricks for solving this problem like copying the file “experimental.py” from htmresearch-core into htmresearch folder and modify swig binding scripts. But trick is trick.
@mrcslws what is your opinion?

@thanh-binh.to, @mccall.ryan We are currently working on making htmresearch easier to install, similar to nupic where you would be able to simply pip install htmresearch, but for now you can try the steps we use internally to build and install htmresearch on our dev laptops:

  1. Build nupic.core
pip install --user numpy==1.12.1 pytest==3.0.7 pytest-cov==2.5.0 pytest-xdist==1.16.0 pycapnp==0.5.12
mkdir -p ~/nta/nupic.core/build/scripts_release
cd ~/nta/nupic.core/build/scripts_release
cmake ../.. -DCMAKE_INSTALL_PREFIX=../release -DCMAKE_BUILD_TYPE=Release -DNUPIC_IWYU=OFF -DNUPIC_TOGGLE_INSTALL=ON -DPY_EXTENSIONS_DIR=~/nta/nupic.core/bindings/py/src/nupic/bindings
make -j6
make install
  1. Instal nupic.core
cd ~/nta/nupic.core
pip install --user numpy==1.12.1 pytest==3.0.7 pytest-cov==2.5.0 pytest-xdist==1.16.0 pycapnp==0.5.12
ARCHFLAGS=-arch x86_64 pip install --user -e .
  1. Install nupic
cd ~/nta/nupic
pip install --user asteval==0.9.1 coverage==3.7.1 mock==1.0.1 ordereddict==1.1 psutil==1.0.1 pytest==3.0.7 pytest-cov==2.5.0 pytest-xdist==1.16.0 python-dateutil==2.1 PyYAML==3.10 unittest2==0.5.1 validictory==0.9.1 PyMySQL==0.6.2 DBUtils==1.1 pyproj==1.9.3 prettytable==0.7.2  numpy==1.12.1
ARCHFLAGS=-arch x86_64 pip install --user -e .
  1. Build htmresearch-core
mkdir -p ~/nta/htmresearch-core/build/scripts_release
cd ~/nta/htmresearch-core/build/scripts_release
cmake ../.. -DCMAKE_INSTALL_PREFIX=../release -DCMAKE_BUILD_TYPE=Release -DNUPIC_IWYU=OFF -DLOCAL_NUPIC_CORE_INSTALL_DIR=~/nta/nupic.core/build/release -DPY_EXTENSIONS_DIR=~/nta/htmresearch-core/bindings/py/src/htmresearch_core
make -j6
make install
  1. Install htmresearch-core
cd ~/nta/htmresearch
pip install --user numpy==1.12.1 pytest==3.0.7 pytest-cov==2.5.0 pytest-xdist==1.16.0 pycapnp==0.5.12
ARCHFLAGS=-arch x86_64 pip install --user -e .
  1. Install htmresearch
cd ~/nta/htmresearch-core
pip install --user matplotlib pandas plotly>=1.12.10 simplejson tabulate tqdm prettytable plyfile scikit-learn
ARCHFLAGS=-arch x86_64 pip install --user -e .

Let me know if it works for you

1 Like

@lscheinkman thanks for your guide. I am 98% sure that i installed in the same ways/steps like you. As i mentioned last post, the file “experimental.py” is missing in htmresearch and even by copying it manuelly from htmresearch-core i have an error by swig bindings helper where the module “_experimental” is not found.

@thanh-binh.to experimental.py is a file generated by cmake/swig, see https://github.com/numenta/htmresearch-core/blob/master/src/CMakeLists.txt#L543

You should not copy it from other locations as it is just a build artifact. Try the above instructions using the latest version from github and make sure to clean your repository before running the commands.

1 Like

@lscheinkman perfect. it works now using your installation guide. Best thanks for your support!

1 Like

By testing the SMI codes, exactly in project l2_pooling, I found that even though both the location and feature are input into L2L4 experiment, but only the location information is encoded using CoordinateEncoder. I can not find out if and how the “feature” will be used? without encoder? Can anyone help me?

Moved from #htm-theory to #htm-hackers.

@thanh-binh.to Please realize this code is still alpha and not ready for real use. Don’t forget the disclaimer: What you should understand about this repository.

Which file in the repo should I start with to study the latest pooling algorithm used in the output layers?

1 Like

@rhyolight I totally agree with you about using this repository. I just want only to learn more about those experiments …and try to discuss …

1 Like