Gravar-mail: Resilient training of neural network classifiers with approximate computing techniques for a hardware-optimized implementation