kungkookie:

which is all 8-bit single-channel index chart with 21 categories.


In that case some transformation or other processing might have created these channel-last 3-channel target tensors in the provided shape [2, 513, 513, 3], which won’t work.
Could you check, where your single-channel targets get converted to 3-channels?