You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this way, `loss_weight` and `loss_name` will be weight and name in training log of corresponding loss, respectively.
69
74
70
75
Note: If you want this loss item to be included into the backward graph, `loss_` must be the prefix of the name.
71
-
72
-
## Ignore specified label index in loss calculation
73
-
74
-
In default setting, `avg_non_ignore=False` which means each pixel counts for loss calculation although some of them belong to ignore-index labels.
75
-
76
-
For loss calculation, we support ignore index of certain label by `avg_non_ignore` and `ignore_index`. In this way, the average loss would only be calculated in non-ignored labels which may achieve better performance, and here is the [reference](https://github.com/open-mmlab/mmsegmentation/pull/1409). Here is an example config of training `unet` on `Cityscapes` dataset: in loss calculation it would ignore label 0 which is background and loss average is only calculated on non-ignore labels:
0 commit comments