Loss terms are not trainable, because loss*w is minimized by w=0 (or other degenerate results with negative numbers). Even constraints like sum(w)=1 don’t have sensible interpretations - normally you would combine predictions instead.