Skip to content

Commit

Permalink
Merge pull request #823 from marrlab/trainer_as_model
Browse files Browse the repository at this point in the history
treat trainer as model
  • Loading branch information
smilesun authored May 7, 2024
2 parents ad94e79 + 79a2524 commit 4970eb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion domainlab/algos/trainers/a_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ def init_business(self, model, task, observer, device, aconf, flag_accept=True):
self._decoratee.init_business(
model, task, observer, device, aconf, flag_accept
)
self.model = model
self.model = self._decoratee
else:
self.model = model
self.task = task
self.task.init_business(trainer=self, args=aconf)
self.model.list_d_tr = self.task.list_domain_tr
Expand Down

0 comments on commit 4970eb6

Please sign in to comment.