Training Neural Networks for Sensors