modified gradient accumulation to have negative accumulation. E.g. dw = dw+d and dw = dw-d
more elegant design with refactored GadientCalc Function
refactored GadientCalc Function
with correct gradient calculation with noise