Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace "Learning PyTorch with Examples" with fitting sine function with a third order polynomial #1265

Merged
merged 21 commits into from
Dec 3, 2020

Conversation

zasdfgbnm
Copy link
Contributor

@zasdfgbnm zasdfgbnm commented Dec 3, 2020

The original "fitting a 2-layer network to noise" example is replaced with fitting a third-order polynomial to the sine function.

The overall structure of the entire article is not changed. Some out-of-date statements are updated. The TensorFlow example is removed because now TF2 uses eager mode by default as well, therefore the comparing becomes obsolete.

The advantage of this is, it is a real fitting problem, rather than a "memorize the noise" problem. Using a real fitting problem makes sure that the final loss will not be sensitive to mantissa precision. Because the inability of the model for fitting ground truth will be much larger than rounding errors. Another advantage of this is, users can easily print and plot the resulting polynomial to evaluate the training.

cc: @soumith @ngimel @csarofeen @ptrblck

@netlify
Copy link

netlify bot commented Dec 3, 2020

Deploy preview for pytorch-tutorials-preview ready!

Built with commit 28f28d8

https://deploy-preview-1265--pytorch-tutorials-preview.netlify.app

@zasdfgbnm zasdfgbnm changed the title [WIP] Replace "Learning PyTorch with Examples" with fitting sine function with a third order polynomial Replace "Learning PyTorch with Examples" with fitting sine function with a third order polynomial Dec 3, 2020
@brianjo brianjo merged commit ce58d59 into pytorch:master Dec 3, 2020
@zasdfgbnm zasdfgbnm deleted the no-matmul branch December 3, 2020 18:06
rodrigo-techera pushed a commit to Experience-Monks/tutorials that referenced this pull request Nov 29, 2021
…ith a third order polynomial (pytorch#1265)

* Replace tutorial with fitting sine function with third order polynomial

* more

* Save

* save

* save

* fix

* fix

* fix

* fix

* no tensor.data

* fix

* P3

* save

* save

* save

* save

* fix

* fix

* fix
brianjo pushed a commit that referenced this pull request Feb 3, 2022
The old artifacts are still accessible in the legacy form with broken layout.

This commit redirects the old pages to the new pages and
remove related assets.

`tf_two_layer` was deleted in #1265 but I am not sure if it should be deleted,
so not changing it in this commit.
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