MCPcopy Create free account
hub / github.com/alexrame/fishr / _init_optimizer

Method _init_optimizer

domainbed/algorithms.py:1195–1200  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1193 self._init_optimizer()
1194
1195 def _init_optimizer(self):
1196 self.optimizer = torch.optim.Adam(
1197 list(self.featurizer.parameters()) + list(self.classifier.parameters()),
1198 lr=self.hparams["lr"],
1199 weight_decay=self.hparams["weight_decay"],
1200 )
1201
1202 def update(self, minibatches, unlabeled=False):
1203 assert len(minibatches) == self.num_domains

Callers 2

__init__Method · 0.95
updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected