Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image.convolve size issue #199

Open
gheaeckkseqrz opened this issue Oct 11, 2016 · 2 comments
Open

image.convolve size issue #199

gheaeckkseqrz opened this issue Oct 11, 2016 · 2 comments

Comments

@gheaeckkseqrz
Copy link

From the documentation :

[res] image.convolve([dst,] src, kernel, [mode])
Convolves Tensor kernel over image src. Valid string values for argument mode are :
full : the src image is effectively zero-padded such that the res of the convolution has the same size as src;

When running with mode = 'full' I'm getting a bigger output.

Test script:

require 'image'

local src = torch.Tensor(3, 200, 200)
res = image.convolve(src, image.gaussian(), 'full')

print("src", src:size())
print("res", res:size())

Results:

➜  lua th bug.lua 
src    3
 200
 200
[torch.LongStorage of size 3]

res    3
 202
 202
[torch.LongStorage of size 3]
@fmassa
Copy link
Contributor

fmassa commented Nov 30, 2016

There is a problem with the documentation. The behaviour is the same as in Matlab.
PRs fixing the doc are welcome :)

@rgp90
Copy link

rgp90 commented Oct 9, 2017

Hi @gheaeckkseqrz
Could you solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants