Inline a scalar multiplication into sgd.