Layer Ensemble Averaging for Improving Memristor-Based Artificial Neural Network Performance