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

Method __init__

domainbed/algorithms.py:121–132  ·  view source on GitHub ↗
(self, input_shape, num_classes, num_domains, hparams)

Source from the content-addressed store, hash-verified

119 """
120
121 def __init__(self, input_shape, num_classes, num_domains, hparams):
122 super(Fish, self).__init__(input_shape, num_classes, num_domains, hparams)
123 self.input_shape = input_shape
124 self.num_classes = num_classes
125
126 self.network = networks.WholeFish(input_shape, num_classes, hparams)
127 self.optimizer = torch.optim.Adam(
128 self.network.parameters(),
129 lr=self.hparams["lr"],
130 weight_decay=self.hparams['weight_decay']
131 )
132 self.optimizer_inner_state = None
133
134 def create_clone(self, device):
135 self.network_inner = networks.WholeFish(

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected