Skip to content

Feedback about Warm-up: numpy - on the Polynomial (Mis)Fit Example in the Tensors Tutorial #3607

@camargocr

Description

@camargocr

Hi there,

I was looking at the tutorial on fitting a polynomial with NumPy and PyTorch:
https://docs.pytorch.org/tutorials/beginner/examples_tensor/polynomial_numpy.html

I noticed that the resulting third-degree polynomial is not a very good fit for the sin(x) function it's supposed to approximate:
f(x) = 0.0003655185795843861 + 0.8513230793867113 x + -6.305803723372667e-05 x² + -0.09255975933441395 x³

You can see a graph of both functions here—they look pretty different:
https://www.geogebra.org/calculator/qyykjrjf

My concern is that this might be a confusing example for beginners. It could give them the wrong impression of what a good result looks like when using PyTorch.

Cheers,
Carlos Rogério Camargo

Image

cc @albanD @jbschlosser

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreTutorials of any level of difficulty related to the core pytorch functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions