add a buffer into gradInput calculation for nodes that branch out