(self, hidden_dim, weight_value)
| 10 | class MultiOutputModel(torch.nn.Module): |
| 11 | |
| 12 | def __init__(self, hidden_dim, weight_value): |
| 13 | super(MultiOutputModel, self).__init__() |
| 14 | self.linear = torch.nn.Linear(hidden_dim, hidden_dim, bias=False) |
| 15 | self.linear.weight.data.fill_(weight_value) |
| 16 | self.cross_entropy_loss = torch.nn.CrossEntropyLoss() |
| 17 | |
| 18 | def forward(self, inputs, targets): |
| 19 | losses = [] |
nothing calls this directly
no outgoing calls
no test coverage detected