But I have to find confusion matrix for multi class image segmentation problem of high resolution images i.e. 1024x2048.
Copying tensors from gpu to cpu i.e. numpy and then calculating confusion matrix is really time consuming.
I found this 118 but it is only of binary classification, not sure how to scale it to multi class.