MCPcopy Create free account
hub / github.com/TPCD/DCCL / forward

Method forward

model/attribute_classifier.py:49–61  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

47 nn.init.constant_(m.bias, 0)
48
49 def forward(self, x):
50 probability = []
51 if self.shared_projected_layer is None:
52 for classifier in self.classifier_list:
53 logit = classifier(x)
54 probability.append(self._softmax(logit))
55 else:
56 x = self.shared_projected_layer(x)
57 for classifier in self.classifier_list:
58 logit = classifier(x)
59 probability.append(self._softmax(logit))
60
61 return probability
62
63
64class Mlp(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected