(self, hidden_dim, empty_grad=False)
| 15 | class SimpleModel(torch.nn.Module): |
| 16 | |
| 17 | def __init__(self, hidden_dim, empty_grad=False): |
| 18 | super(SimpleModel, self).__init__() |
| 19 | self.linear = torch.nn.Linear(hidden_dim, hidden_dim, bias=True) |
| 20 | self.linear = torch.nn.Linear(hidden_dim, hidden_dim, bias=False) |
| 21 | if empty_grad: |
| 22 | self.layers2 = torch.nn.ModuleList([torch.nn.Linear(hidden_dim, |
| 23 | hidden_dim)]) #QuantizeLinear(hidden_dim, hidden_dim) |
| 24 | self.cross_entropy_loss = torch.nn.CrossEntropyLoss() |
| 25 | |
| 26 | def forward(self, x, y): |
| 27 | hidden = x |
nothing calls this directly
no outgoing calls
no test coverage detected