This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
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.
Fix dumps for Constant initializer #15150
Fix dumps for Constant initializer #15150
Changes from 2 commits
db81ea9
d0db62c
0452c9c
071a065
03b9983
fe8828d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 might be good if we could randomize the shape and dimension for this test and test it for different dimensions
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.
Added randomized shape and dimension for the array in test, it can take values between 1 and 10 with 1D to 5D shapes.
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.
in line 29
test_variable_init
and other initializer tests are written differently. can we follow a similar pattern of declaring a sym variable and binding it to a module and initializing the params.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.
I am just checking the function of dumps() in the test I have added, is creating a module still required?
test_rsp_const_init
in line 48 already does that for Constant initializers.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.
test_rsp_const_init
does the following -https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_init.py#L52-L57
The reason I am asking this change is because I think that will be a more comprehensive test and will check the whole flow, and it will test the initializer the way it will actually be used in production. This change should enable serializing and deserializing an
ndarray
object.Just check once with a committer who will merge this code. Everything else LGTM.