pytorch conv2d with weights
I have these 2 variables:
result- tensor 1 X 251 X 20
kernel - tensor 1 X 10 X 10

when I run the command:
from torch.nn import functional as F
result = F.conv2d(result, kernel)

I get the error:
RuntimeError: expected stride to be a single integer value or a list of 1 values to match the convolution dimensions, but got stride=[1, 1]

I am not giving any stride, what am I doing wrong?

import torch
import torch.nn.functional as F
image = torch.rand(16, 3, 32, 32)
filter = torch.rand(1, 3, 5, 5)
out_feat_F = F.conv2d(image, filter,stride=1, padding=0)
print(out_feat_F.shape)

Out:
torch.Size([16, 1, 28, 28])

Which is equivalent with:
import torch
import torch.nn
image = torch.rand(16, 3, 32, 32)
conv_filter = torch.nn.Conv2d(in_channels=3, out_channels=1, kernel_size=5, stride=1, padding=0)
output_feature = conv_filter(image)
print(output_feature.shape)

Out:
torch.Size([16, 1, 28, 28])

Padding is by default 0, stride is by default 1.
The filter last two dimensions in the first example correspond to the
kernel size in the second example.
kernel_size=5 is the same as kernel_size=(5,5).
