This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Reducing memory footprint of one_hot for Large Array Testing #16136
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mxnet-label-bot add [pr-awaiting-review] |
access2rohit
force-pushed
the
fix_one_hot
branch
from
September 10, 2019 22:34
9c4c4a2
to
2838fea
Compare
@apeforest @ChaiBapchya PR is ready for review |
apeforest
reviewed
Sep 10, 2019
tests/nightly/test_large_vector.py
Outdated
a[0] = 1 | ||
a[-1] = 1 | ||
#default dtype of ndarray is float32 which cannot index elements over 2^32 | ||
a = nd.array([1], dtype=np.int64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you don't even need this array a?
just do a = nd.one_hot([1], LARGE_X)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it still expects numpy array and errors out AssertionError: Argument indices must have NDArray type
cannot avoid that. Also, it keeps default dtype as np.float32 so we have to explicitly give dtype as int64
Actually, after checking test_large_array.py, I think this test is redundant. We can remove it from test_large_vector. |
access2rohit
changed the title
Reducing memory footprint of one_hot for Large Vector Testing
Reducing memory footprint of one_hot for Large Array Testing
Sep 10, 2019
…ncorporate large vector part of the test
apeforest
approved these changes
Sep 11, 2019
access2rohit
added a commit
to access2rohit/incubator-mxnet
that referenced
this pull request
Sep 25, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
access2rohit
added a commit
to access2rohit/incubator-mxnet
that referenced
this pull request
Sep 25, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
access2rohit
added a commit
to access2rohit/incubator-mxnet
that referenced
this pull request
Sep 25, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
larroy
pushed a commit
to larroy/mxnet
that referenced
this pull request
Sep 28, 2019
…16136) * reducing memory footprint of one_hot for Large Tensor * removing one_hot from large_vector and changing large_array test to incorporate large vector part of the test
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Using 2 element one hot location NDarray to ensure
one_hot
operator is not using too much memory.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Testing
Currently running full suite of all tests in test_large_array.py