Thanks for your Reply!
Unfortunately my target doesn’t contain the background class as some class index.
All of my targets consist of a pixel value 0 (background) or other(desire target).
ex. one of 3x3 size target array consists of
[0 1 0
0 1 1
0 0 1] <- stack 180 slice and batch_size 4 : target shape : [4,3,3] ; [batch_size, height, width]
I this case, If I apply the transform method that you suggested without having to process a pixel with a value of 0, will it have two classes?