How to encode images and other visual data for HTM system

Great work!
I’m sure taking a DL latent vector and turning it into a binary vector to feed to HTM is discussed/practiced in this forum before.
(Like this one: Proof of concept: Trainable universal encoder architecture)
And I’m doing something similar at the moment as well.
I’ve actually added k-winner layer to the bottleneck of the network and also had a loss function to enforce sparsity over time to make it get along with HTM better.
I’ve used this tactic to encode English words to binary vectors:
https://colab.research.google.com/drive/1341rA9fQFwCcUUgKcTnZVcyA9UuqmBHY