How to get all trainable parameters on NuPIC

My name is Rin. I’m a student studying artificial intelligence in Japan.
I became very interested in HTM after reading “On Intelligence”. In my next paper, I would like to compare the performance of LSTM and HTM.
Is there a way to get the number of SP and TM trainable parameters, as in keras model.summary()?
Thank you.


Welcome to the forums!

Not being a NuPIC user, but implemented my own framework. I think there is no API to do so, but you can calculate it easily.

For a SP, it is straightforward, being num_cells*num_input_bits*connection_pct.

For a TM, generally you can’t. HTM’s synapses are sparse and they grow. Thus the amount of trainable parameters grows as time goes on and does down when synapse decay happens. However, you can calculate the theoretical maximum amount of connections as max_synapses_per_segment*segments_per_cell*num_cells

i think there is already a paper on << LSTM vs HTM >> you can fetch it out on the Internet and read it.

1 Like

Please read Continuous Online Sequence Learning with an Unsupervised Neural Network Model, which contains comparisons between HTM and LSTM.


Thank you for your reply! I would like to try your framework too.

thank you for the information. I hope this topic will help beginners like me.

1 Like

Thank you for your reply! This paper contains very detailed comparisons! it will be a great help when I write my paper.

@1111 I found that I have a mistake when calculating the number of parameters of a SP. Please read my updated post.

I checked the your latest post. Thank you very much!

1 Like