From a3ce28b633288e4423d45d0504317f224bf5909d Mon Sep 17 00:00:00 2001 From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu> Date: Tue, 9 Mar 2021 14:29:33 +0100 Subject: [PATCH] Do not increase weight for uda. --- pysegcnn/core/trainer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysegcnn/core/trainer.py b/pysegcnn/core/trainer.py index 00efc68..d8c3602 100644 --- a/pysegcnn/core/trainer.py +++ b/pysegcnn/core/trainer.py @@ -1576,7 +1576,7 @@ class DomainAdaptationTrainer(ClassificationNetworkTrainer): target = iter(self.trg_train_dl) # increase domain adaptation weight with increasing epochs - uda_lambda = self.uda_lambda * ((epoch + 1) / self.epochs) + # uda_lambda = self.uda_lambda * ((epoch + 1) / self.epochs) # iterate over the number of samples for batch, (src_input, src_label) in enumerate(self.src_train_dl): @@ -1610,7 +1610,7 @@ class DomainAdaptationTrainer(ClassificationNetworkTrainer): uda_loss = self.uda_loss_function(src_feature, trg_feature) # total loss - tot_loss = cla_loss + uda_lambda * uda_loss + tot_loss = cla_loss + self.uda_lambda * uda_loss # compute the gradients of the loss function w.r.t. # the network weights -- GitLab