pytorch语义分割fcn出错Assertion `t >= 0 && t < n_classes ` failed

img

使用的源代码:https://github.com/WZMIAOMIAO/deep-learning-for-image-processing
我自己的数据集除去背景为3类,于是我将代码中的num_classes改为3,就出现了上述错误。而若改为4或5(大于3)便可运行。不知道为什么会出错😭😭,请大家指导一下!解决可有偿,联系我即可,谢谢大家!