Method
forward
(
self,
x: torch.Tensor,
start_pos: int,
mask: Optional[torch.Tensor],
)
Source from the content-addressed store, hash-verified
| 244 | self.norm_2 = LPLayerNorm(args.d_model, eps=1e-6) |
| 245 | |
| 246 | def forward( |
| 247 | self, |
| 248 | x: torch.Tensor, |
| 249 | start_pos: int, |
| 250 | mask: Optional[torch.Tensor], |
| 251 | ): |
| 252 | h = x + self.attn.forward(self.norm_1(x), start_pos, mask) |
| 253 | out = h + self.ffn.forward(self.norm_2(h)) |
| 254 | return out |
| 255 | |
| 256 | |
| 257 | class Transformer(nn.Module): |
Callers
nothing calls this directly
Tested by
no test coverage detected