# Implementations

**URL:** https://discourse.numenta.org/c/engineering/implementations/47.md

[Latest](https://discourse.numenta.org/latest.md) · [Categories](https://discourse.numenta.org/categories.md) · [Tags](https://discourse.numenta.org/tags.md)

---

## [About the Implementations category](https://discourse.numenta.org/t/about-the-implementations-category/6194)

<div class="topic-metadata">

**Author:** [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Replies:** 0

</div>

Have you written your own Spatial Pooling or Temporal Memory algorithm? Or are you looking for an HTM in a certain environment? Someone may have already written it! Check here for different language implementations of HT…

---

## [Interactive Visualization of Discrete Cortical Circuits (DCC)](https://discourse.numenta.org/t/interactive-visualization-of-discrete-cortical-circuits-dcc/12136)

<div class="topic-metadata">

**Author:** [@jacobeverist](https://discourse.numenta.org/u/jacobeverist)\
**Replies:** 0\
**Last updated:** [December 4, 2025, 7:42pm UTC](https://discourse.numenta.org/t/interactive-visualization-of-discrete-cortical-circuits-dcc/12136 "2025-12-04T19:42:30Z")

</div>

Hello all! I just wanted to share a project I’ve been working on for some time. I cross-posted this over at the TBT forum since I’m not sure where the conversation is these days. Just a bit about me. I was introduced…

---

## [Releasing BrainBlocks 0.7.1: Building ML Applications with HTM-Like Algorithms](https://discourse.numenta.org/t/releasing-brainblocks-0-7-1-building-ml-applications-with-htm-like-algorithms/9926)

<div class="topic-metadata">

**Author:** [@jacobeverist](https://discourse.numenta.org/u/jacobeverist)\
**Replies:** 14\
**Last updated:** [May 2, 2025, 1:29pm UTC](https://discourse.numenta.org/t/releasing-brainblocks-0-7-1-building-ml-applications-with-htm-like-algorithms/9926 "2025-05-02T13:29:18Z")

</div>

BrainBlocks 0.7.1 is released. We have previously posted about Brainblocks on this discussion board. This release includes a number of changes reflecting the user feedback provided by people here. We also included …

---

## [Sklearn adapter for HTM?](https://discourse.numenta.org/t/sklearn-adapter-for-htm/11756)

<div class="topic-metadata">

**Author:** [@jordan.kay](https://discourse.numenta.org/u/jordan.kay)\
**Replies:** 1\
**Last updated:** [February 20, 2025, 8:56pm UTC](https://discourse.numenta.org/t/sklearn-adapter-for-htm/11756 "2025-02-20T20:56:34Z")

</div>

I’d love to use sci-kit-learn or sklearn or even just a python package to use the HTM to produce future predictions. What’s the best implementation to use?

---

## [SDR Implimentation of neural network Layers](https://discourse.numenta.org/t/sdr-implimentation-of-neural-network-layers/11521)

<div class="topic-metadata">

**Author:** [@LALAK\_YADAV](https://discourse.numenta.org/u/LALAK_YADAV)\
**Replies:** 5\
**Last updated:** [September 24, 2024, 12:15pm UTC](https://discourse.numenta.org/t/sdr-implimentation-of-neural-network-layers/11521 "2024-09-24T12:15:45Z")

</div>

I’ve been trying to apply Sparse Distributed Representations (SDR) to simple neural network layers. Can anyone suggest a method for achieving this? I want to ensure that only 2-5% of the neurons are active in each layer. …

---

## [HTM Teacher](https://discourse.numenta.org/t/htm-teacher/11516)

<div class="topic-metadata">

**Author:** [@MTIzNDU2Nzg5](https://discourse.numenta.org/u/MTIzNDU2Nzg5)\
**Replies:** 4\
**Last updated:** [September 20, 2024, 2:02am UTC](https://discourse.numenta.org/t/htm-teacher/11516 "2024-09-20T02:02:33Z")

</div>

I have always wanted to see a super slim version of HTM implementation that has output to show how it might work, but my coding skill is zero. Just create this with ChatGPT o1-preview in a few minutes.

---

## [Code to measure the accuracy in HTM.Core](https://discourse.numenta.org/t/code-to-measure-the-accuracy-in-htm-core/11408)

<div class="topic-metadata">

**Author:** [@Shwetha\_Vittal](https://discourse.numenta.org/u/Shwetha_Vittal)\
**Replies:** 0\
**Last updated:** [June 17, 2024, 10:30am UTC](https://discourse.numenta.org/t/code-to-measure-the-accuracy-in-htm-core/11408 "2024-06-17T10:30:16Z")

</div>

Hi, I have been trying to use HTM.Core for one of the works in 5G Network slicing anomaly detection. For this, I have followed the example of hotgym.py. I want to capture the accuracy of anomaly detection overall. Thoug…

---

## [How should I encode low res RGB image for OpenAI minigrid gym](https://discourse.numenta.org/t/how-should-i-encode-low-res-rgb-image-for-openai-minigrid-gym/11236)

<div class="topic-metadata">

**Author:** [@buckithed](https://discourse.numenta.org/u/buckithed)\
**Replies:** 4\
**Last updated:** [February 24, 2024, 8:11pm UTC](https://discourse.numenta.org/t/how-should-i-encode-low-res-rgb-image-for-openai-minigrid-gym/11236 "2024-02-24T20:11:47Z")

</div>

Im trying to use an htm net as part of my agent to play the minigrid gym, and am wondering if i should encode each rgb values a a scalar, or filter it into individual r g and b binary pixel representations, then feed it…

---

## [Looking for more information regarding Numenta's L2 implementation](https://discourse.numenta.org/t/looking-for-more-information-regarding-numentas-l2-implementation/11145)

<div class="topic-metadata">

**Author:** [@Socradeez](https://discourse.numenta.org/u/Socradeez)\
**Replies:** 6\
**Last updated:** [December 8, 2023, 10:30pm UTC](https://discourse.numenta.org/t/looking-for-more-information-regarding-numentas-l2-implementation/11145 "2023-12-08T22:30:38Z")

</div>

So I’m currently working on a project to create a simplified version of the experiment laid out here: https://www.frontiersin.org/articles/10.3389/fncir.2017.00081/full You can find my current implementation here: https…

---

## [Assistance with Parameter Tuning in HTM Algorithms](https://discourse.numenta.org/t/assistance-with-parameter-tuning-in-htm-algorithms/11121)

<div class="topic-metadata">

**Author:** [@Karthik](https://discourse.numenta.org/u/Karthik)\
**Replies:** 1\
**Last updated:** [November 23, 2023, 5:19am UTC](https://discourse.numenta.org/t/assistance-with-parameter-tuning-in-htm-algorithms/11121 "2023-11-23T05:19:32Z")

</div>

Hello HTM Community, I’m relatively new to HTM and currently working with the community fork of NuPIC core on Python3. My main challenge is manually tuning the parameters to optimize performance, which I find quite diff…

---

## [TM produces too many dendrites](https://discourse.numenta.org/t/tm-produces-too-many-dendrites/10894)

<div class="topic-metadata">

**Author:** [@Jossos](https://discourse.numenta.org/u/Jossos)\
**Replies:** 17\
**Last updated:** [September 3, 2023, 12:11am UTC](https://discourse.numenta.org/t/tm-produces-too-many-dendrites/10894 "2023-09-03T00:11:21Z")

</div>

Ive implemented Spatial Pooler (4096 minicolumns) → Temporal Memory algorithm and am using it to predict what it will see just moving a 128x128 kernal over a 600x700 image. The result is it filling my Ram (about 30 gb) w…

---

## [Spatial Pooler in Rust](https://discourse.numenta.org/t/spatial-pooler-in-rust/10813)

<div class="topic-metadata">

**Author:** [@dmac](https://discourse.numenta.org/u/dmac)\
**Replies:** 0\
**Last updated:** [June 6, 2023, 1:57am UTC](https://discourse.numenta.org/t/spatial-pooler-in-rust/10813 "2023-06-06T01:57:57Z")

</div>

I wrote yet another HTM, this time in the rust language. So far I’ve only implemented the Spatial Pooler. I tested that it works on the MNIST dataset and it scores over 90%.

---

## [Is HTM.Core more used with C++ rather than python?](https://discourse.numenta.org/t/is-htm-core-more-used-with-c-rather-than-python/10810)

<div class="topic-metadata">

**Author:** [@buckithed](https://discourse.numenta.org/u/buckithed)\
**Replies:** 3\
**Last updated:** [June 5, 2023, 3:18am UTC](https://discourse.numenta.org/t/is-htm-core-more-used-with-c-rather-than-python/10810 "2023-06-05T03:18:50Z")

</div>

Originally I tried installing nupic.core, but couldn’t because it was too outdated. I then went on to use HTM.core, and that was less of a battle, but still is hard to figure out. I have been using the Python Region impl…

---

## [A Deeper Look at Transformers: Famous Quote: "Attention is all you need"](https://discourse.numenta.org/t/a-deeper-look-at-transformers-famous-quote-attention-is-all-you-need/10523)

<div class="topic-metadata">

**Author:** [@BrainConstellation](https://discourse.numenta.org/u/BrainConstellation)\
**Replies:** 59\
**Last updated:** [May 26, 2023, 10:41pm UTC](https://discourse.numenta.org/t/a-deeper-look-at-transformers-famous-quote-attention-is-all-you-need/10523 "2023-05-26T22:41:25Z")

</div>

Check out this implementation with a step by step demonstration of a Transformer Model by Andrej Karpathy. Sparsity (one-hot encoding) and tensors and attention are all well put to work in this compact and dense demo. …

---

## [Union Pooler implementation not working as expected](https://discourse.numenta.org/t/union-pooler-implementation-not-working-as-expected/10489)

<div class="topic-metadata">

**Author:** [@seanjhardy](https://discourse.numenta.org/u/seanjhardy)\
**Replies:** 17\
**Last updated:** [March 20, 2023, 8:49pm UTC](https://discourse.numenta.org/t/union-pooler-implementation-not-working-as-expected/10489 "2023-03-20T20:49:11Z")

</div>

I’m writing my own implementation of a union pooler/temporal pooling algorithm to learn to represent currently active sequences in a longer-term context. I’m adapting the code from the nupic python library from this unio…

---

## [Using ChatGPT for faster prototyping](https://discourse.numenta.org/t/using-chatgpt-for-faster-prototyping/10373)

<div class="topic-metadata">

**Author:** [@MTIzNDU2Nzg5](https://discourse.numenta.org/u/MTIzNDU2Nzg5)\
**Replies:** 0\
**Last updated:** [January 2, 2023, 4:29pm UTC](https://discourse.numenta.org/t/using-chatgpt-for-faster-prototyping/10373 "2023-01-02T16:29:30Z")

</div>

Been using ChatGPT to understand HTM codes. Also a good tool for porting to other programming languages. Still need programming skills to correct some errors.

---

## [Scalar vectors as intermediate stages](https://discourse.numenta.org/t/scalar-vectors-as-intermediate-stages/10259)

<div class="topic-metadata">

**Author:** [@cezar\_t](https://discourse.numenta.org/u/cezar_t)\
**Replies:** 4\
**Last updated:** [November 8, 2022, 9:51pm UTC](https://discourse.numenta.org/t/scalar-vectors-as-intermediate-stages/10259 "2022-11-08T21:51:34Z")

</div>

Here are a few observations about using dense scalar vectors in the context of SDR-based machinery. A dense intermediate vector is what basically DL is working with. - e.g. each hidden layer computing a vector of floa…

---

## [Gradient Clusteron Visualization](https://discourse.numenta.org/t/gradient-clusteron-visualization/10125)

<div class="topic-metadata">

**Author:** [@CollinsEM](https://discourse.numenta.org/u/CollinsEM)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 5:26pm UTC](https://discourse.numenta.org/t/gradient-clusteron-visualization/10125 "2022-09-28T17:26:20Z")

</div>

I’ve implemented a visualization of the Gradient Clusteron algorithm described by Toviah Moldwin, et.al. in this video, and this paper. Please let me know if you have questions, comments, or suggestions on how to improve…

---

## [Proportional Scalar Encoder?](https://discourse.numenta.org/t/proportional-scalar-encoder/10104)

<div class="topic-metadata">

**Author:** [@cezar\_t](https://discourse.numenta.org/u/cezar_t)\
**Replies:** 6\
**Last updated:** [September 16, 2022, 5:53pm UTC](https://discourse.numenta.org/t/proportional-scalar-encoder/10104 "2022-09-16T17:53:02Z")

</div>

I searched for such a beast, which bit overlap between any two encoded numbers is higher as their ratio is closer to 1. e.g. overlap between 900 and 1000 would be the same as the one between 0.9 and 1 PS “biological …

---

## [Releasing BrainBlocks 0.6: Building ML Applications with HTM-Like Algorithms](https://discourse.numenta.org/t/releasing-brainblocks-0-6-building-ml-applications-with-htm-like-algorithms/7675)

<div class="topic-metadata">

**Author:** [@jacobeverist](https://discourse.numenta.org/u/jacobeverist)\
**Replies:** 51\
**Last updated:** [July 25, 2022, 1:44am UTC](https://discourse.numenta.org/t/releasing-brainblocks-0-6-building-ml-applications-with-htm-like-algorithms/7675 "2022-07-25T01:44:16Z")

</div>

We are pleased to announce the public release of our software to the HTM community. Feel free to explore the README and the example code. We will be following up with more detailed analysis, discussion, and documentat…

---

## [Temporal Memory Performance/Scaling Tricks](https://discourse.numenta.org/t/temporal-memory-performance-scaling-tricks/9862)

<div class="topic-metadata">

**Author:** [@cezar\_t](https://discourse.numenta.org/u/cezar_t)\
**Replies:** 16\
**Last updated:** [July 1, 2022, 8:25pm UTC](https://discourse.numenta.org/t/temporal-memory-performance-scaling-tricks/9862 "2022-07-01T20:25:47Z")

</div>

I’ve seen the performance and memory size questions popping up a few times. One main cause is the TM footprint can grow quite a lot by multiplying column cell area x height x segments/cell x synapses per segment. (and…

---

## [Spatial pooler training and Temporal Memory](https://discourse.numenta.org/t/spatial-pooler-training-and-temporal-memory/9879)

<div class="topic-metadata">

**Author:** [@Adam\_Brooks](https://discourse.numenta.org/u/Adam_Brooks)\
**Replies:** 0\
**Last updated:** [June 29, 2022, 7:52pm UTC](https://discourse.numenta.org/t/spatial-pooler-training-and-temporal-memory/9879 "2022-06-29T19:52:54Z")

</div>

I have created a spatial pooler and temporal memory following the guide in BAMI. Can anyone comment on how best to train them? What I mean is should I train the spatial pooler for a set number of iterations or is it be…

---

## [Temporal memory](https://discourse.numenta.org/t/temporal-memory/9714)

<div class="topic-metadata">

**Author:** [@Adam\_Brooks](https://discourse.numenta.org/u/Adam_Brooks)\
**Replies:** 7\
**Last updated:** [May 5, 2022, 8:54pm UTC](https://discourse.numenta.org/t/temporal-memory/9714 "2022-05-05T20:54:53Z")

</div>

I am following along to build a temporal memory algorithm using pseudo code from BAMI https://numenta.com/assets/pdf/biological-and-machine-intelligence/BaMI-Complete.pdf On pg. 53 the code states: newSynapseCount = (S…

---

## [Given what we know about biology and SDR's would you still code it the same way?](https://discourse.numenta.org/t/given-what-we-know-about-biology-and-sdrs-would-you-still-code-it-the-same-way/9528)

<div class="topic-metadata">

**Author:** [@BrainVx](https://discourse.numenta.org/u/BrainVx)\
**Replies:** 0\
**Last updated:** [March 6, 2022, 8:00pm UTC](https://discourse.numenta.org/t/given-what-we-know-about-biology-and-sdrs-would-you-still-code-it-the-same-way/9528 "2022-03-06T20:00:39Z")

</div>

With the biological knowledge of the way in which we think that dendritic connections create associations/memory, particularly the proximal and distal sensitivities, if you were starting a code base from scratch would yo…

---

## [Implementing SDR long term memory?](https://discourse.numenta.org/t/implementing-sdr-long-term-memory/8274)

<div class="topic-metadata">

**Author:** [@mraptor](https://discourse.numenta.org/u/mraptor)\
**Replies:** 9\
**Last updated:** [March 6, 2022, 11:21am UTC](https://discourse.numenta.org/t/implementing-sdr-long-term-memory/8274 "2022-03-06T11:21:13Z")

</div>

The question I want to ask is : What is the mechanism to store and recall SDR’s i.e. how would you implement SDR-long-term-memory ? The specs should at least implement : Store large amount of SDR’s … millions ? Like …

---

## [SDR overlap speed tests numba vs](https://discourse.numenta.org/t/sdr-overlap-speed-tests-numba-vs/9390)

<div class="topic-metadata">

**Author:** [@cezar\_t](https://discourse.numenta.org/u/cezar_t)\
**Replies:** 21\
**Last updated:** [February 16, 2022, 1:05pm UTC](https://discourse.numenta.org/t/sdr-overlap-speed-tests-numba-vs/9390 "2022-02-16T13:05:53Z")

</div>

Here-s a performance test on the basic counting overlaps of two SDRs import numba from htm.bindings.sdr import SDR import numpy as np # This is a "naive" python implementation which "compiles" well in numba def py\_over…

---

## [Question about Spatial pooler](https://discourse.numenta.org/t/question-about-spatial-pooler/9215)

<div class="topic-metadata">

**Author:** [@shiva](https://discourse.numenta.org/u/shiva)\
**Replies:** 10\
**Last updated:** [December 26, 2021, 3:40pm UTC](https://discourse.numenta.org/t/question-about-spatial-pooler/9215 "2021-12-26T15:40:02Z")

</div>

please explain about overlap score measure thanks

---

## [Spatial Pooler Implementation for MNIST Dataset](https://discourse.numenta.org/t/spatial-pooler-implementation-for-mnist-dataset/2317)

<div class="topic-metadata">

**Author:** [@dmac](https://discourse.numenta.org/u/dmac)\
**Replies:** 48\
**Last updated:** [August 20, 2021, 1:03pm UTC](https://discourse.numenta.org/t/spatial-pooler-implementation-for-mnist-dataset/2317 "2021-08-20T13:03:53Z")

</div>

Summary I implemented a spatial pooler (S.P.) and Maximal Likelihood classifier and used them to achieve 77% accuracy on the MNIST dataset. My implementation differs in a few ways from Numenta’s. The code and figures …

---

## [Is there an HTM version that could integrate with otsad (e.g. Python3)?](https://discourse.numenta.org/t/is-there-an-htm-version-that-could-integrate-with-otsad-e-g-python3/9097)

<div class="topic-metadata">

**Author:** [@markNZed](https://discourse.numenta.org/u/markNZed)\
**Replies:** 4\
**Last updated:** [November 3, 2021, 9:45am UTC](https://discourse.numenta.org/t/is-there-an-htm-version-that-could-integrate-with-otsad-e-g-python3/9097 "2021-11-03T09:45:45Z")

</div>

I came across the otsad project for benchmarking anomaly detectors based on NAB and it is a shame that HTM is not included. As mentioned in this issue the reason is because nupic requires Python2 Learning more about otsa…

---

## [Current state of affairs on implementations of reference frames and/or grid cells](https://discourse.numenta.org/t/current-state-of-affairs-on-implementations-of-reference-frames-and-or-grid-cells/9084)

<div class="topic-metadata">

**Author:** [@xortdsc](https://discourse.numenta.org/u/xortdsc)\
**Replies:** 1\
**Last updated:** [October 28, 2021, 10:12pm UTC](https://discourse.numenta.org/t/current-state-of-affairs-on-implementations-of-reference-frames-and-or-grid-cells/9084 "2021-10-28T22:12:59Z")

</div>

Hi all, after reading and hearing a lot about the new reference frame methology of the thousand brains theory, i was wondering if there is any working model of how these reference frames can actually be generated in a s…

[Next page](https://discourse.numenta.org/c/engineering/implementations/47.md?page=1)
