Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Hi, I encounter a bug when I try to use your DL lib. I set a conv kernel of shape (16, 3, 3, 3), which means 16 filters each with 3x3 kernel and 3 channels and an image of shape (1, 14, 14, 3) and the result is different from PyTorch. Code is here.
Running the code give me this result.
The shape is correct but the values are wrong.
However, if I change the image matrix to
and with this code
it gives me this result
and PyTorch result is
IT IS CORRECT!!!!
Hi the different results may be caused by the padding method. In the first case, the output shape is 7x7, which means for input 14x14 and kernel 3x3 stride 2, there should be 1 additional zero padding. So the question is where to add the odd padding, if we add it at the left side, then the result is the same as PyTorch, while if we add it at the right side, the result is what you got. We refer the method of tensorflow here.