calclavia / htm-tensorflow

An implementation of Numenta's HTM algorithm in Tensorflow.
67 stars 20 forks source link

how to understand the computation of delta? Thanks #2

Open white2018 opened 7 years ago

white2018 commented 7 years ago

@calclavia I read spatial_pooler.py, and cannot understand line 95, delta = tf.einsum('ij,ik,jk->jk', x_shifted, y, self.connection) / batch_size. what is the mechanism of computing delta p based on x, y and self.connection? Could you give me some clues or hints? Thanks

PAIWANG94 commented 6 years ago

@calclavia I have the same question.

calclavia commented 6 years ago

See https://www.tensorflow.org/api_docs/python/tf/einsum

The docs have a good explanation on how einsum works.