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

Update mean_squared_error.py #2530

Merged
merged 2 commits into from
Mar 25, 2022
Merged

Update mean_squared_error.py #2530

merged 2 commits into from
Mar 25, 2022

Conversation

leotac
Copy link
Contributor

@leotac leotac commented Mar 25, 2022

Update docstring of MSE so that it's consistent with the actual behavior.

Description:

MSE is actually computing the sum of squared differences for each element i before taking the average. The current documentation only covers the case where y is a vector (predicting scalar values), but in cases where the prediction has higher dimension than 1 the formula is not valid/clear.
With the change, it would be valid for both cases.

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

Update docstring of MSE so that it's consistent with the actual behavior.
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Mar 25, 2022

@leotac thanks for the update! We'll check docs rendering once GHA will be working again.

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM

@vfdev-5 vfdev-5 enabled auto-merge (squash) March 25, 2022 17:35
@vfdev-5 vfdev-5 merged commit 69ea3c8 into pytorch:master Mar 25, 2022
@vfdev-5 vfdev-5 added the docs label May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants