Selective hardening for neural networks in FPGAs