Since PSPNet uses convolutions, you should pass your input as [batch_size, channels height, width] (channels-first).
It looks like your targets are RGB images, where each color encodes a specific class.
If that’s the case, you should map the colors to class indices.
I’m not familiar with the ADE20K dataset, but you might find a mapping between the colors and class indices somwhere online.
If not, you can just create your own mapping, e.g. using a dict and transform the targets.