An Input-Training Neural Network Approach for Gross Error Detection and Sensor Replacement