Energy efficient, secure and noise robust deep learning for the internet of things