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

Simplify direction vector sampling in gradient_check #8238

Merged
merged 2 commits into from
Oct 10, 2019

Conversation

niboshi
Copy link
Member

@niboshi niboshi commented Oct 3, 2019

Based on #8236

Simplifies the implementation of direction vector sampling in gradient_check, by avoiding repeated loops.

@niboshi niboshi added the cat:code-fix Code refactoring that does not change the behavior. label Oct 3, 2019
Copy link
Member

@toslunar toslunar left a comment

Choose a reason for hiding this comment

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

LGTM. It's fair to leave this point #8236 (comment).

@toslunar
Copy link
Member

Jenkins & flexCI, test this please.

@toslunar toslunar added the st:test-and-merge State indicating that pull request is approved by a reviewer and can be merged after CI passes. label Oct 10, 2019
sizes = [int(numpy.prod(shape)) for shape in shapes]
cumsizes = numpy.cumsum(sizes)
unpacked_arrays = [
packed_array[cumsize - size:cumsize].reshape(shape)
Copy link
Member

Choose a reason for hiding this comment

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

OK to return views because they are only used in perturb.

@chainer-ci
Copy link
Member

Jenkins CI test (for commit b676495, target branch master) succeeded!

@mergify mergify bot merged commit b7c6e36 into chainer:master Oct 10, 2019
@niboshi niboshi deleted the simplify-direction-vector branch October 10, 2019 12:47
@kmaehashi kmaehashi added this to the v7.0.0rc1 milestone Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:code-fix Code refactoring that does not change the behavior. st:test-and-merge State indicating that pull request is approved by a reviewer and can be merged after CI passes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants