Closed Haoxiang-Wang closed 4 years ago
Hi, First, thanks a lot for this library!
Recently I found a bug in this line of your code: https://github.com/cybertronai/autograd-hacks/blob/2c2e494cbf7a0240199cd767f3179477f25f4e23/autograd_hacks.py#L165
The bug makes the code not compatible with non-default padding and stride in Conv2d. Hence, this should be corrected to A = torch.nn.functional.unfold(A, layer.kernel_size,padding=layer.padding,stride=layer.stride)
A = torch.nn.functional.unfold(A, layer.kernel_size,padding=layer.padding,stride=layer.stride)
Best regards, Haoxiang
I found this issue is already posted by another user. https://github.com/cybertronai/autograd-hacks/issues/3
Hi, First, thanks a lot for this library!
Recently I found a bug in this line of your code: https://github.com/cybertronai/autograd-hacks/blob/2c2e494cbf7a0240199cd767f3179477f25f4e23/autograd_hacks.py#L165
The bug makes the code not compatible with non-default padding and stride in Conv2d. Hence, this should be corrected to
A = torch.nn.functional.unfold(A, layer.kernel_size,padding=layer.padding,stride=layer.stride)
Best regards, Haoxiang