-
Notifications
You must be signed in to change notification settings - Fork 964
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
VolumetricAveragePooling gives error when Kernel Size is equal to the Input Feature Map(s)'s size #536
Comments
I think the problem lies in the different order the dimenisons are parsed by the In Whereas the In fact, on further inspection, I found that this is the case with all the _Volumetric_ modules. @soumith and @fmassa , can either of you please confirm regarding this. |
The easiest fix could be to change the input format of the _Volumetric_ modules (the Then the underlying |
@kmul00 i dont think that's the issue. They are correctly parsed here: https://github.com/torch/nn/blob/master/generic/VolumetricAveragePooling.c#L46-L51 |
@soumith Yeah, that part is correct. The input format is
So, when it performs And similarly for |
dimw = 3 is correct. The ordering in the constructors is a bit legacy, and is ordered kT, kW, kH. But the inputs / outputs are ordered iT x iH x iW. |
I think that's why it is creating a problem. Most of the times we keep the height and width dimenion same, hence it doesn't cause any problem. For example, if I use
it throws an error as pointed out in the issue. But instead, if I use
it executes without any error. Of course the results are erroneous, but the dimesnions doesn't cause any problem. |
The example itself is wrong. Inputs should be: inputs = torch.rand(8, 16, 5, 5, 7) -- t, h, w because the constructor is: |
Oh, now I see. This made it clear. The orderings of the kernel and input are altogether different. Sorry for the confusion. |
Hi there,
When I am using Kernel Size is equal to the Input Feature Map(s)'s size, I am getting following error,
...ch/install/share/lua/5.1/nn/VolumetricAveragePooling.lua:20: bad argument #2 to 'VolumetricAveragePooling_updateOutput' (input image smaller than kernel size)
I think we need to check > rather than >= in the following kind of argcheck ???
luaL_argcheck(L, input->size[dimw] >= kW && input->size[dimh] >= kH &&
input->size[dimt] >= kT, 2,
"input image smaller than kernel size");
Here is the code to check the things quickly,
The text was updated successfully, but these errors were encountered: