I just did the work. convert the non-zero part to a set and then sort it

QQ截图20180706201031.png756×118 3.6 KB

and I 'm wondering if the two images are  0 1 based, why their subtraction can generate digit out of 0 1?
In my thought ,the argmax can generate image  with channel label ,so it should be 0 or 1.the target,it still 0 or 1(I use cv2.imread to read pic as a ndarray, and do torchvision.ToTensor directly, cause seems it transform the [0,255] to [0.0,1.0])
so the target and pred all consist of 0 or 1, can they generate other digit?
I’m wondering where I went wrong.