batchnorm-pruning icon indicating copy to clipboard operation
batchnorm-pruning copied to clipboard

A doubt about sgd.py

Open talebolano opened this issue 6 years ago • 0 comments

in paper, the ista algorithm described as rl+1 = max{(rl-u▽l),0}*sgn(rl-u▽l) , but in sgd.py, the ista algorithm described as: x = p.data.add(-group['lr'],d_p) x = torch.clamp((torch.abs(x) - ista), min=0.) p.data = x * torch.sign(x) I think the true code should be: x = p.data.add(-group['lr'],d_p) y = torch.clamp((torch.abs(x) - ista), min=0.) p.data = y * torch.sign(x)

talebolano avatar May 05 '19 06:05 talebolano