Hi, have you solved the problem? I also use the libtorch to do my segmentation task, but the results which are visualized  are strange,  but i  print  the  logits or array of the results , i find the logits is the same as that in pytorch , so  my guess is also the mat type changes strangely in the tensor conversion process.
I hope i can get your reply, thank you so much, i need help urgently…