This is the unofficial code of Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes. which achieve state-of-the-art trade-off between accuracy and speed on cityscapes and camvid, without using inference acceleration and extra data
That means valid_loss and mean_IoU are calculated on each 10 steps. However, they are printed on each step. Therefore, if you make RESUME: true in configs, and your previous model was NOT on epochs that are multiples of 10, errors will occur:
UnboundLocalError: local variable 'valid_loss' referenced before assignment.
UnboundLocalError: local variable 'mean_IoU' referenced before assignment.
UnboundLocalErrors occur on resume training.
valid_loss
andmean_IoU
are obtained by code below:in train.py:
That means
valid_loss
andmean_IoU
are calculated on each 10 steps. However, they are printed on each step. Therefore, if you makeRESUME: true
in configs, and your previous model was NOT on epochs that are multiples of 10, errors will occur: