Step3: Construct the memristor neural network (LeNet-5 is used in this demo).