Describe the bug
When setting class_weight=[1.0,9.0], a CUDA error: device side assert triggered appears because during data_preprocessor, seg_map that smaller crop_size will be pad to crop_size with 255. This leads to the absence of class_weight[255] when class_weight=[1.0, 9.0].
Bug fix
The simplest method is to set seg_ pad_val=-1 in data_preprocessor.
Then, set ignore_index=seg_ pad_val=-1 in decode_ head and/or auxiliary_head.
In addition, in order to avoid the loss of average coefficients and consider padding labels, set avg_non_ignore=True in loss_decode