Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Sample python bilinear initializer at integral points in y-direction#12983

Merged
sandeep-krishnamurthy merged 2 commits intoapache:masterfrom
vladoovtcharov:patch/bilinear_init
Jan 26, 2019
Merged

Sample python bilinear initializer at integral points in y-direction#12983
sandeep-krishnamurthy merged 2 commits intoapache:masterfrom
vladoovtcharov:patch/bilinear_init

Conversation

@vladoovtcharov
Copy link
Copy Markdown
Contributor

Bilinear initializer was sampling at fractional points in y rather then sampling at integral points (like is done for x)

@vladoovtcharov vladoovtcharov requested a review from szha as a code owner October 26, 2018 16:48
@ankkhedia
Copy link
Copy Markdown
Contributor

@vladoovtcharov Thanks for your contribution!

@mxnet-label-bot [pr-awaiting-review, Python]

@vandanavk @Roshrini @sandeep-krishnamurthy Could you please help review the PR

@marcoabreu marcoabreu added pr-awaiting-review PR is waiting for code review Python labels Oct 29, 2018
for i in range(np.prod(shape)):
x = i % shape[3]
y = (i / shape[3]) % shape[2]
y = (i // shape[3]) % shape[2]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@ankkhedia
Copy link
Copy Markdown
Contributor

@sandeep-krishnamurthy Could you please label this issue as pr-awaiting-response

@sandeep-krishnamurthy sandeep-krishnamurthy added pr-awaiting-response PR is reviewed and waiting for contributor to respond and removed pr-awaiting-review PR is waiting for code review labels Oct 31, 2018
@kalyc
Copy link
Copy Markdown
Contributor

kalyc commented Nov 12, 2018

Hi @vladoovtcharov thanks for your contribution! Could you please address the comments above?

@stu1130
Copy link
Copy Markdown
Contributor

stu1130 commented Nov 21, 2018

@vladoovtcharov ping again.
let us know if you need any help!

@vladoovtcharov
Copy link
Copy Markdown
Contributor Author

vladoovtcharov commented Nov 21, 2018

_init_bilinear looks redundant and also seems to be deprecated from the comments but has the same issue so I changed that one as well.
Some initializers have tests in incubator-mxnet/tests/python/unittest/test_init.py but not bilinear I added a quick test for now

@anirudhacharya
Copy link
Copy Markdown
Member

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.

@vandanavk
Copy link
Copy Markdown
Contributor

what are the next steps on this PR @vladoovtcharov @anirudhacharya @szha ?

Copy link
Copy Markdown
Member

@roywei roywei left a comment

Choose a reason for hiding this comment

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

LGTM! @vladoovtcharov thanks for the contribution, could you trigger CI by rebase or push an empty commit?

@vladoovtcharov vladoovtcharov force-pushed the patch/bilinear_init branch 3 times, most recently from 0fa8ca0 to 5e59c11 Compare December 18, 2018 05:01
@vladoovtcharov
Copy link
Copy Markdown
Contributor Author

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

@vladoovtcharov
Copy link
Copy Markdown
Contributor Author

Wasn't handling division correctly in python 2. Seems to be working now

@Roshrini
Copy link
Copy Markdown
Member

Roshrini commented Jan 2, 2019

@sandeep-krishnamurthy Can you please review/merge this PR?
@mxnet-label-bot Update [Python, pr-awaiting-merge]

@marcoabreu marcoabreu added pr-awaiting-merge Review and CI is complete. Ready to Merge and removed pr-awaiting-response PR is reviewed and waiting for contributor to respond labels Jan 2, 2019
@anirudhacharya
Copy link
Copy Markdown
Member

@Roshrini can you please merge this

Copy link
Copy Markdown

@sandeep-krishnamurthy sandeep-krishnamurthy left a comment

Choose a reason for hiding this comment

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

Thanks

stephenrawls pushed a commit to stephenrawls/incubator-mxnet that referenced this pull request Feb 16, 2019
…pache#12983)

* Sample python bilinear initializer at integral points in y-direction

* Add unit test for bilinear initializer
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
…pache#12983)

* Sample python bilinear initializer at integral points in y-direction

* Add unit test for bilinear initializer
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr-awaiting-merge Review and CI is complete. Ready to Merge Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants