K-sparse autoencoder

Hi,

do you have an idea how to implement a K-sparse autoencoder in Pytorch like in the paper :
https://arxiv.org/pdf/1312.5663.pdf ?

Thanks for your help !