-
Notifications
You must be signed in to change notification settings - Fork 6.8k
the grad of lars should be scaled in lbsgd #15102
Comments
Hey, this is the MXNet Label Bot. |
@mxnet-label-bot add [operator, bug] |
Hi @starimpact Could you provide some more info like a brief description of the problem with a minimum reproducible example? |
@mxnet-label-bot add [Pending Requester Info] |
The user point to a valid location:
Please track this file for further investigation. @starimpact could you please bring more information about why this change is necessary? |
@starimpact please try this optimizer https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/optimizer/optimizer.py#L788 and close this issue if your concern is addressed. lbsgd is likely to be deprecated. |
_l2norm is time consuming for a large parameter, so I suggest it should be: def _l2norm(self, v):
"inner product implementation"
#for big local parameter
v = v.reshape(-1)
if len(v) > 100000:
step = len(v)/100000+1
v = v[::step]
norm = multiply(v, v).asnumpy().sum()
#norm = (multiply(v, v).sum()).asnumpy()
norm = math.sqrt(norm)
return norm |
The text was updated successfully, but these errors were encountered: