Based on the input shapes the in_features of the first linear layer should be set to 3*28*28=2352 and you would most likely want to flatten the input via:
    def forward(self, x):
        x  = x.view(x.size(0), -1)
        x = self.dropout(F.relu(self.fc1(x)))