We can use  torch.nn.Conv2d  to create an usual convolution layer, but if I want to creat a convolution layer with a kernel of novel shape, such as ‘T’ shape(means with kernel weight of [[w1,0],[0,0]] ),and the parameter’w1’ can be learned.  what should I do?
I use the function
class Redchannel_Conv(nn.Module):
def init(self):
super(Redchannel_Conv, self).init()
w1 = 0.1
self.W1 = nn.Parameter(torch.Tensor([[w1,0],[0,0]]))
def forward(self,x):
print(self.W1)
return F.conv2d(x, self.W1, stride=2)
but have the error:  RuntimeError: weight should at least have at least two dimensions
Could somebody help me? Thanks very much!