@ptrblck I have similar problem. Can you please help me to figure out. I have pasted my code here below.
import torch.nn as nn

class MLP1(nn.Module):

  def __init__(self):

    super(MLP1, self).__init__()

    # TODO: define your MLP1

    self.fc1 = nn.Linear(2048, 1024)

    self.fc2 = nn.Linear(1024, 512)

    self.output = nn.Linear(512, 10)  

    # Dropout for all hidden layers: 30% 

    self.drouput1 = nn.Dropout2d(p=0.3)

    self.drouput2 = nn.Dropout2d(p=0.3)

    # Activation Function and Softmax for Output layer

    self.relu = nn.ReLU()

    #self.softmax = nn.Softmax(dim=1)

  def forward(self, y):

    # TODO: define your forward function

    y = torch.flatten(y, start_dim = 1)

    y = self.drouput1(self.relu(self.fc1(y)))

    y = self.drouput2(self.relu(self.fc2(y)))

    return y

mlp1 = MLP1().to(device)  # operate on GPU

print(mlp1)

params = list(mlp1.parameters())

print(len(params))

print(params[0].size())

print(params[1].size())

print(params[2].size())

print(params[3].size())

print(params[4].size())

print(params[5].size())

-----------------------------------------------------------------------------------
MLP1(
  (fc1): Linear(in_features=2048, out_features=1024, bias=True)
  (fc2): Linear(in_features=1024, out_features=512, bias=True)
  (output): Linear(in_features=512, out_features=10, bias=True)
  (drouput1): Dropout2d(p=0.3, inplace=False)
  (drouput2): Dropout2d(p=0.3, inplace=False)
  (relu): ReLU()
)
6
torch.Size([1024, 2048])
torch.Size([1024])
torch.Size([512, 1024])
torch.Size([512])
torch.Size([10, 512])
torch.Size([10]) 
--------------------------------------------------------------------------------

correct1 = 0

total1 = 0

with torch.no_grad():

  for data in cifar_testloader:

    # TODO: write testing code

    images, labels = data

    images = images.to(device)

    labels = labels.to(device)

    output1 = mlp1(images)

    _, predicted1 = torch.max(output1.data, 1)

    total1 += labels.size(0)

    correct1 += (predicted1 == labels).sum().item()

print('Accuracy of the MLnetwork on the 10000 test images: %d %%' % (100 * correct1 / total1))

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-18-64656ef79eea> in <module>()
      8     labels = labels.to(device)
      9 
---> 10     output1 = mlp1(images)
     11     _, predicted1 = torch.max(output1.data, 1)
     12     total1 += labels.size(0)

4 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in linear(input, weight, bias)
   1672     if input.dim() == 2 and bias is not None:
   1673         # fused op is marginally faster
-> 1674         ret = torch.addmm(bias, input, weight.t())
   1675     else:
   1676         output = input.matmul(weight.t())

RuntimeError: mat1 dim 1 must match mat2 dim 0
----------------------------------------------------------------------------------