Afternoon,
I am hoping someone can help me i am getting the following error message:
output = input.matmul(weight.t())

RuntimeError: size mismatch, m1: [2 x 10], m2: [2 x 10] at C:/w/1/s/tmp_conda_3.7_044431/conda/conda-bld/pytorch_1556686009173/work/aten/src\THC/generic/THCTensorMathBlas.cu:268
class Decoder(nn.Module):
    def __init__(self,lat_dim):
        super(Decoder, self).__init__()
        self.fc1 = nn.Linear(lat_dim, 10)

        self.decode = nn.Sequential(OrderedDict([
#            ('fc1',nn.Linear(lat_dim,30)),
            ('HT1',nn.Hardtanh()),
            ('fc2',nn.Linear(30,64)),
            ('co1',nn.ConvTranspose1d(1,1,2,stride=2)),#128
            ('co2',nn.ConvTranspose1d(1,1,2,stride=2)),#256
            ('up1',nn.Upsample(scale_factor=2)), #512
            ('co3',nn.Conv1d(1,1,8,stride=2,padding=4)),#256
            ('co4',nn.ConvTranspose1d(1,1,8,stride=4,padding=2)),#1024
            ('co5',nn.ConvTranspose1d(1,1,4,stride=2,padding=1)),#2048
            ('up2',nn.Upsample(scale_factor=2)),#4096
            ('co6',nn.Conv1d(1,1,8,stride=4,padding=4)),#1024
            ('co7',nn.ConvTranspose1d(1,1,2,stride=1)),#1025
            ('co8',nn.ConvTranspose1d(1,1,2,stride=2)),#2050
            ('up3',nn.Upsample(scale_factor=2)),#4100
            ('co9',nn.Conv1d(1,1,16,stride=8,padding=6)),#512
            ('co10',nn.ConvTranspose1d(1,1,8,stride=4,padding=8)),#2048
            ]))
    def forward(self, z):
        #x.view returns a new tensor with the same data as the self tensor but different shape
        print(z.shape)
        z = F.relu(self.fc1(z))
        print(z)
        print(z.shape)
        z = z.view(-1, 32, 21)
        z = self.decode(z)  
        out=torch.sigmod(z)
        return out


Can anyone help me please?
Cheers
Chaslie