Open LiZhenLiangLee opened 3 years ago
Line 59&60 in loss/criterion.py pred = preds[0] + preds[1] loss4 = lovasz_softmax(F.softmax(pred, dim=1), target, ignore=self.ignore_index)
pred = preds[0] + preds[1]
loss4 = lovasz_softmax(F.softmax(pred, dim=1), target, ignore=self.ignore_index)
这里的 pred 没有做upsample, 然后直接给了lovasz_softmax, 而 target 是原图的size大小,这样会造成 pred 与 target 的size 不匹配。
pred
target
Line 59&60 in loss/criterion.py
pred = preds[0] + preds[1]
loss4 = lovasz_softmax(F.softmax(pred, dim=1), target, ignore=self.ignore_index)
这里的
pred
没有做upsample, 然后直接给了lovasz_softmax, 而target
是原图的size大小,这样会造成 pred 与 target 的size 不匹配。