This is an AXPY operation. You can write

~~~
// get gradient of the regularization term
val gradient = weights - updater.compute ...
// get gradient of the total loss
brzAxpy(1.0 / miniBatchSize, gradientSum, gradient)
~~~