Seems like the answer is in the RuntimeError. You are attempting to multiply two 2D tensors with incompatible dimensions. m1 has dimension [11354 x 1] and m2 has dimensions [11354 x 16] so you’ll need to transpose one or the other (depending on what result you’re hoping to get). It’s a bit unclear what you’re trying to accomplish here though so I can’t say which is correct.

x = torch.matmul(torch.t(x),self.weight)   ----> yields [1 x 16] tensor


x = torch.matmul(torch.t(self.weight),x)   ----> yields [16 x 1] tensor

Alternatively, if you are trying to convolve each row of x with each row of self.weight, you’ll need a different operation. Can’t tell what you’re trying to do from code given.