'Returns a parameter step calculated from the gradient.
This differs from grad_array() as the parameter may be shared such
that its gradient has multiple sources.'

def grad(self):

    grad = self.grad_array
    for param in self.shares:
        grad += param.grad_array
    grad = self._add_penalty(grad)
    return grad
