(self, x)
| 32 | self.weight = nn.Parameter(torch.ones(dim) * init_values) |
| 33 | |
| 34 | def forward(self, x): |
| 35 | if self.inplace: |
| 36 | return x.mul_(self.weight.view(-1, 1, 1)) |
| 37 | else: |
| 38 | return x * self.weight.view(-1, 1, 1) |
| 39 | |
| 40 | class TransformerStage(nn.Module): |
| 41 |
nothing calls this directly
no outgoing calls
no test coverage detected