For some predefined operation i need to fix the parameters of a convolution  layer.
when I have this layer
self.conv1 = nn.Conv2d(1, 5, kernel_size=1, stride=1, padding=0,  bias=False)

the code works fine, however when I set the weights of constitutional filter  as
self.conv1 = nn.Conv2d(1, 5, kernel_size=1, stride=1, padding=0,  bias=False)
self.conv1.weight = torch.nn.Parameter(torch.ones((1, 1, 5)))

I received following 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]

Any idea how can i solve this problem?