(self, nlayers=2)
| 46 | class MLPModel(torch.nn.Module): |
| 47 | |
| 48 | def __init__(self, nlayers=2): |
| 49 | super().__init__() |
| 50 | self.layers = torch.nn.ModuleList([MLPBlock() for _ in range(nlayers)]) |
| 51 | self.head = torch.nn.Linear(HIDDEN_DIM, HIDDEN_DIM, bias=False) |
| 52 | |
| 53 | def forward(self, x): |
| 54 | for layer in self.layers: |