Skip to content

Update mean_squared_error.py#2530

Merged
vfdev-5 merged 2 commits intopytorch:masterfrom
leotac:patch-2
Mar 25, 2022
Merged

Update mean_squared_error.py#2530
vfdev-5 merged 2 commits intopytorch:masterfrom
leotac:patch-2

Conversation

@leotac
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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