Solved by ptrblck in post #2 
              
              
                The forward method of your model returns a tuple via: 
return output, x    # return x for visualization

which creates the issue in loss = criterion(outputs, labels). 
I assume you want to use output to calculate the loss, so use: 
        output, x = model(inputs)
        loss = criterion(output, l…