KEMBAR78
To add Stochastic Gradient Descent to Documentation by iramazanli · Pull Request #63805 · pytorch/pytorch · GitHub
Skip to content

Conversation

@iramazanli
Copy link
Contributor

@iramazanli iramazanli commented Aug 23, 2021

It has been discussed before that adding description of Optimization algorithms to PyTorch Core documentation may result in a nice Optimization research tutorial. In the following tracking issue we mentioned about all the necessary algorithms and links to the originally published paper #63236.

In this PR we are adding description of Stochastic Gradient Descent to the documentation.

SGDalgo

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 23, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 01da448 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@iramazanli iramazanli force-pushed the sgd_algorithm_doc branch 2 times, most recently from be3fc4a to 9914ca7 Compare August 24, 2021 19:46
@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #63805 (9914ca7) into master (f0d2742) will decrease coverage by 0.10%.
The diff coverage is n/a.

❗ Current head 9914ca7 differs from pull request most recent head 3cff074. Consider uploading reports for the commit 3cff074 to get more accurate results

@@            Coverage Diff             @@
##           master   #63805      +/-   ##
==========================================
- Coverage   67.09%   66.99%   -0.11%     
==========================================
  Files         692      691       -1     
  Lines       90579    90570       -9     
==========================================
- Hits        60774    60677      -97     
- Misses      29805    29893      +88     

@iramazanli iramazanli force-pushed the sgd_algorithm_doc branch 4 times, most recently from a66c6ad to 4fcf682 Compare August 31, 2021 22:39
@iramazanli iramazanli requested a review from albanD August 31, 2021 22:40
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this case could just be an "else" for the if t > 1 below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually the if t>1 condition happens inside \mu \neq 0 condition. however t==1 condition is in general scope above, so it might be tricky to replace it here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that correct? from the code, we just multiply the current buffer by momentum (not 1-\tau) and we add that to the gradients.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i guess formulas get confused when i was trying to make a shortcut expression then return back to the plain version.

@iramazanli iramazanli changed the title To add Stochastic Gradient Descent to PyTorch To add Stochastic Gradient Descent to Documentation Sep 8, 2021
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@facebook-github-bot
Copy link
Contributor

@iramazanli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@iramazanli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@iramazanli merged this pull request in 149f111.

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.

3 participants