target is any gray scale image, I will use this as an example: 
Visually target contains 4 regions (classes), the fund counts. But because target has pixels of various values (including 255), NLLLoss requires that output be [1, 256, 60, 59] in size, but I would like it to be [1, 4, 60, 59]. (The loss function is not required to be NLLLoss.)