Skip to content

Conversation

@kashif
Copy link
Contributor

@kashif kashif commented Dec 22, 2017

Fix for issue #4271

@kashif kashif changed the title fix for issue #4271 fix AMSGrad for SparseAdam Dec 22, 2017
@soumith
Copy link
Contributor

soumith commented Dec 24, 2017

@pytorchbot test this please

torch.max(old_max_exp_avg_sq_values, exp_avg_sq_update_values, out=old_max_exp_avg_sq_values)
denom = old_max_exp_avg_sq_values.sqrt_().add_(group['eps'])
max_exp_avg_sq = make_sparse(old_max_exp_avg_sq_values)
max_exp_avg_sq.put_(grad_indices, old_max_exp_avg_sq_values)

This comment was marked as off-topic.

This comment was marked as off-topic.

exp_avg_sq_update_values.add_(old_exp_avg_sq_values)
if amsgrad:
torch.max(old_max_exp_avg_sq_values, exp_avg_sq_update_values, out=old_max_exp_avg_sq_values)
max_exp_avg_sq.put_(grad_indices, old_max_exp_avg_sq_values)

This comment was marked as off-topic.

This comment was marked as off-topic.

@apaszke
Copy link
Contributor

apaszke commented Dec 30, 2017

@pytorchbot test this please

@apaszke apaszke merged commit 859a173 into pytorch:master Dec 30, 2017
@apaszke
Copy link
Contributor

apaszke commented Dec 30, 2017

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants