Skip to content

Commit

Permalink
unit test passed
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun committed Oct 14, 2024
1 parent 80bc363 commit 141fb6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion domainlab/algos/trainers/train_miro.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ def _cal_reg_loss(self, tensor_x, tensor_y, tensor_d, others=None):
mean_ref = list_batch_inter_feat_ref[ind_layer]
mean_ref = mean_ref.to(device)
vlb = (mean - mean_ref).pow(2).div(var) + var.log()
reg_loss += vlb / 2.
reg_loss += vlb.mean(axis=-1) / 2.
return [reg_loss], [self.aconf.gamma_reg]

0 comments on commit 141fb6f

Please sign in to comment.