Solved by ptrblck in post #5 
              
              
                You code should rename the self.conv1 layers: 
class ModelA(nn.Module):
    def __init__(self):
        super(ModelA, self).__init__()
        self.conv1 = nn.Conv2d(1, 6, 3, 1, 1)
        self.fc1 = nn.Linear(6*4*4, 2)
        
    def forward(self, x):
        x = F.relu(self.conv1(x))
        x =…