Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun committed Sep 17, 2024
1 parent c078bc4 commit 88ec169
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion domainlab/algos/trainers/train_coral.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def cross_domain_mmd(self, tuple_data_domains_batch):
for ind_domain_b in range(ind_domain_a, num_domains):
data_b, *_ = tuple_data_domains_batch[ind_domain_b]
feat_b = self.model.extract_semantic_feat(data_b)
list_cross_domain_mmd.append(sum(self.mmd(feat_a, feat_b)))
mmd = self.mmd(feat_a, feat_b)
list_cross_domain_mmd.append(sum(mmd))
return list_domain_erm_loss, list_cross_domain_mmd

def tr_epoch(self, epoch):
Expand Down

0 comments on commit 88ec169

Please sign in to comment.