cjolivier01 commented on a change in pull request #7903: Refactor AdaGrad optimizer to support sparse tensors URL: https://github.com/apache/incubator-mxnet/pull/7903#discussion_r139483293
########## File path: python/mxnet/optimizer.py ########## @@ -665,26 +667,46 @@ class AdaGrad(Optimizer): eps: float, optional Small value to avoid division by 0. """ - def __init__(self, eps=1e-7, **kwargs): + def __init__(self, eps=1e-7, stype='default', **kwargs): super(AdaGrad, self).__init__(**kwargs) self.float_stable_eps = eps + self.stype = stype def create_state(self, index, weight): - return zeros(weight.shape, weight.context) # history + return zeros(weight.shape, weight.context, stype=self.stype) # history Review comment: done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services