Sample python bilinear initializer at integral points in y-direction#12983
Conversation
|
@vladoovtcharov Thanks for your contribution! @mxnet-label-bot [pr-awaiting-review, Python] @vandanavk @Roshrini @sandeep-krishnamurthy Could you please help review the PR |
| for i in range(np.prod(shape)): | ||
| x = i % shape[3] | ||
| y = (i / shape[3]) % shape[2] | ||
| y = (i // shape[3]) % shape[2] |
There was a problem hiding this comment.
there is a _init_bilinear method in the base Initializer class - https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/initializer.py#L212 . Is this class redundant?
Also I see that many of the initializers do not have tests. Could you please add a test for this change by creating a new file test_initializer.py in the tests folder. Tests for other initializers can be added to the same file later.
|
@sandeep-krishnamurthy Could you please label this issue as pr-awaiting-response |
|
Hi @vladoovtcharov thanks for your contribution! Could you please address the comments above? |
|
@vladoovtcharov ping again. |
|
|
|
The issue of code redundancy still remains. I am not sure about the history about this bit of code, pinging @szha to maybe help shed some light here. |
|
what are the next steps on this PR @vladoovtcharov @anirudhacharya @szha ? |
roywei
left a comment
There was a problem hiding this comment.
LGTM! @vladoovtcharov thanks for the contribution, could you trigger CI by rebase or push an empty commit?
0fa8ca0 to
5e59c11
Compare
|
python2 test seems to be failing (but works for python 3). I don't currently have python 2 installed but I'll try to test out soon |
5e59c11 to
b43347a
Compare
|
Wasn't handling division correctly in python 2. Seems to be working now |
|
@sandeep-krishnamurthy Can you please review/merge this PR? |
|
@Roshrini can you please merge this |
…pache#12983) * Sample python bilinear initializer at integral points in y-direction * Add unit test for bilinear initializer
…pache#12983) * Sample python bilinear initializer at integral points in y-direction * Add unit test for bilinear initializer
Bilinear initializer was sampling at fractional points in y rather then sampling at integral points (like is done for x)