tiangexiang / SQUID

[CVPR 2023] Deep Feature In-painting for Unsupervised Anomaly Detection in X-ray Images
MIT License
90 stars 6 forks source link

How to set the weight of each loss item #3

Open FFFox-abc opened 1 year ago

FFFox-abc commented 1 year ago

I noticed that the loss is composed of 5 part. In the paper said: " We set loss weights as λt = 0.01, λs = 10, λdist = 0.001, λgen = 0.005, and λdis = 0.005." is there some tricks to set? or just set accroding experience?

tiangexiang commented 1 year ago

Hey! Thanks for your interest in our work! Setting the loss weights really depends on the absolute value of the weighted losses. In general, different loss functions may give losses at very different scales, and we hope to scale them to an appropriate common scale. We also observed in our experiments (e.g. ablations) that some parts of the network may need to be updated more than others, so we tune the weights accordingly.