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

New style mean_squared_error #3194

Merged
merged 4 commits into from Aug 29, 2017
Merged

Conversation

delta2323
Copy link
Member

This PR is a part of #3147 and apply the new-style API to mean_squared_error.

@beam2d beam2d mentioned this pull request Aug 21, 2017
27 tasks
@niboshi niboshi added the cat:feature Implementation that introduces new interfaces. label Aug 22, 2017
Copy link
Member

@unnonouno unnonouno left a comment

Choose a reason for hiding this comment

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

Check comments.

def backward(self, indexes, gy):
x0, x1 = self.get_retained_inputs()
ret = []
diff = x0 - x1
Copy link
Member

Choose a reason for hiding this comment

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

diff is calculated here. You don't need to store self.diff in forward_xxx.

@@ -1,10 +1,11 @@
import numpy

from chainer import function
from chainer import function_node
from chainer.functions.array import broadcast
Copy link
Member

Choose a reason for hiding this comment

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

Use chainer.functions.broadcast_to

@unnonouno unnonouno self-assigned this Aug 27, 2017
@delta2323
Copy link
Member Author

Thank you for your review. Updated.

@unnonouno
Copy link
Member

jenkins test this please

1 similar comment
@unnonouno
Copy link
Member

jenkins test this please

@unnonouno
Copy link
Member

LGTM

@unnonouno unnonouno merged commit 9453976 into chainer:master Aug 29, 2017
@unnonouno unnonouno added this to the v3.0.0rc1 milestone Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature Implementation that introduces new interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants