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

[Operator] Bilinear upsamping#746

Merged
antinucleon merged 4 commits intoapache:masterfrom
antinucleon:master
Nov 30, 2015
Merged

[Operator] Bilinear upsamping#746
antinucleon merged 4 commits intoapache:masterfrom
antinucleon:master

Conversation

@antinucleon
Copy link
Contributor

@piiswrong @winstywang Init is not implemented and not test yet, seems don't need concat

@piiswrong
Copy link
Contributor

what do you mean dont need concat? does this handle multiple input without duplicating memory?

@antinucleon
Copy link
Contributor Author

After init the bilinear weight with

weight = np.zeros(np.prod(shape))
f = shape[3] / 2.
c = (2 * f - 1 - f % 2) / (2. * f)
for i in range(np.prod(shape)):
    x = i % shape[3]
    y = (i / shape[3]) % shape[2]
    weight[i] = (1 - abs(x / f - c)) * (1 - abs(y / f - c));

the result is:

original image:
original

nearest result:
nearest

bilinear result:
bilinear

@antinucleon antinucleon changed the title [WIP] [Operator] Bilinear upsamping [Operator] Bilinear upsamping Nov 29, 2015
@antinucleon
Copy link
Contributor Author

@piiswrong I have finished bilinear upsampling. For hypercolumn or concat, I am not very clear about these and feel free to refactor for your purpose.

BTW. Travis lint system is not working correctly.

@piiswrong
Copy link
Contributor

I think it's easy to do for nearest neighbor. I'll do it after you merge this.

@piiswrong
Copy link
Contributor

What happened to travis lint? Did the rule set change?

@antinucleon
Copy link
Contributor Author

https://travis-ci.org/dmlc/mxnet/jobs/93842415 ,seems are errors with numpy and some more strict rules.

@antinucleon
Copy link
Contributor Author

Right

antinucleon added a commit that referenced this pull request Nov 30, 2015
[Operator] Bilinear upsamping
@antinucleon antinucleon merged commit 8007864 into apache:master Nov 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments