Skip to content

Commit

Permalink
matchdg
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun committed Oct 6, 2023
1 parent f514287 commit 32d6d3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions domainlab/algos/compos/matchdg_ctr_erm.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def update_batch(self, epoch, batch_idx, x_e, y_e, d_e):
# these losses within one batch

if self.flag_erm:
loss_erm_rnd_loader = self.phi.cal_loss(x_e, y_e, d_e)
loss_erm_rnd_loader, *_ = self.phi.cal_loss(x_e, y_e, d_e)

num_batches = len(self.tuple_tensor_refdomain2each)

Expand Down Expand Up @@ -152,7 +152,7 @@ def update_batch(self, epoch, batch_idx, x_e, y_e, d_e):
# @FIXME: check if batch_ref_domain2each_y is
# continuous number which means it is at its initial value,
# not yet filled
loss_erm_match_tensor = self.phi.cal_loss(
loss_erm_match_tensor, *_ = self.phi.cal_loss(
batch_tensor_ref_domain2each, batch_ref_domain2each_y.long())

# Creating tensor of shape (domain size, total domains, feat size )
Expand Down

0 comments on commit 32d6d3b

Please sign in to comment.