scripts/optimizers.py
def update(self, theta, grad):
        """
        Updates theta with a step computed with a given gradient.

        :param theta: the parameters to update
        :param grad: the gradient that should be used for the update
        """
        self.t += 1
        step = self._compute_step(grad)
        theta.add_(step)  # in-place adding, no need to return theta
        return step

        Updates theta with a step computed with a given gradient.

        :param theta: the parameters to update
        :param grad: the gradient that should be used for the update
        
Updates theta with a step computed with a given gradient.
Updates theta with a step computed with a given gradient .
def update(self, theta, grad):
        self.t += 1
        step = self._compute_step(grad)
        theta.add_(step)  
        return step
def update ( self , theta , grad ) : self . t += 1 step = self . _compute_step ( grad ) theta . add_ ( step ) return step
Updates theta with a step computed with a given gradient.
Updates theta with a step computed with a given gradient .
"""
        Updates theta with a step computed with a given gradient.

        :param theta: the parameters to update
        :param grad: the gradient that should be used for the update
        """ # in-place adding, no need to return theta
self
theta
the parameters to update
the parameters to update
grad
the gradient that should be used for the update
the gradient that should be used for the update