Open long123524 opened 3 years ago
I think the main reason is, the loss function only averages over batch size but not over spatial size. See https://github.com/xwjabc/hed/blob/master/hed.py#L296 for more information.
Thanks, How can I reduce the values of loss while maintaining good results?
You may use the loss function averaged over both batch size and spatial size, and scale up the learning rate accordingly (i.e. new LR = spatial size * old LR).
Thanks. Does the spatial size mean the size of the input image?
It should be the size of the output (i.e., the predicted edge map).
I have a question. The training loss of the HED network is relatively large, thousands or even higher, but the result is not bad. Why is the loss of the HED relatively large? Under normal circumstances, loss should be a very small value.