-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Dear Doctor:
Your work is excellent! I have some questions that I would like to ask for your help.
I added LCL to my UDA model, the way I did it was to take 2-norm on logit before it passed in the cross-entropy loss function, I changed the eps from 1e-7 to 1e-3 due to using AMP, but after adding LCL, my loss function curve keeps going up. Did I do anything wrong?
2-norm
norms = torch.norm(logits_src, p=2, dim=1, keepdim=True) + 1e-3
normed_logit = torch.div(logits_src, norms)
norms_hr = torch.norm(hr_logits_src, p=2, dim=1, keepdim=True) + 1e-3
normed_logit_hr = torch.div(hr_logits_src, norms_hr)
cross-entropy loss
loss_src =0.9 * self.loss(normed_logit, gt_src) + \
0.1 * self.loss(normed_logit_hr, cropped_gt_src)
Looking forward to your help! Thanks!
best regards!
Metadata
Metadata
Assignees
Labels
No labels