Junjue-Wang / LoveDA

[NeurIPS 2021] LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation
361 stars 50 forks source link

语义分割训练过程中的num_classes是8还是7 ? #74

Closed Voruarn closed 1 year ago

Voruarn commented 1 year ago

因为我用 cross_entropy loss训练语义分割模型时,num_classes为7会报错,num_classes为8可以正常运行。 但是Dataset and Contest部分却说 And the no-data regions were assigned 0 which should be ignored. 有点困惑。

Junjue-Wang commented 1 year ago

num_classes=7,我的dataloader自动把0变成了负1 ignore了

Voruarn commented 1 year ago

好的,谢谢