(self, x)
| 451 | nn.init.constant_(m.bias, 0) |
| 452 | |
| 453 | def forward(self, x): |
| 454 | probability = [] |
| 455 | attribute_embedding = [] |
| 456 | for individual_head in self.classifier_list: |
| 457 | projected = individual_head[0](x) |
| 458 | _attribute_embedding = individual_head[1](projected) |
| 459 | attribute_embedding.append(_attribute_embedding.detach().clone()) |
| 460 | logit = individual_head[2](_attribute_embedding) |
| 461 | probability.append(self._log_softmax(logit)) |
| 462 | attribute_embedding = torch.cat(attribute_embedding, dim=1) |
| 463 | |
| 464 | if self.training == True: |
| 465 | return probability |
| 466 | else: |
| 467 | return attribute_embedding |
| 468 | |
| 469 | |
| 470 | class Attribute_Classifier3(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected