Skip to content

A doubt about sgd.py #10

@talebolano

Description

@talebolano

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions