Yes, sure. You just have to get rid of the channel dimension in your targets, since you don’t need them.
The targets are encoded as indices in the pixel positions. Have a look at my sample code. My target doesn’t have the channel dim and it’s working.
Could you try that?