Reduction 93.7% time and power consumption using a memristor-based imprecise gradient update algorithm