Controlling uniformity of RRAM characteristics through the forming process