(self, ids, mask=None)
| 306 | self.apply(init_weights) |
| 307 | |
| 308 | def forward(self, ids, mask=None): |
| 309 | x = self.token_embedding(ids) |
| 310 | x = self.dropout(x) |
| 311 | e = self.pos_embedding(x.size(1), |
| 312 | x.size(1)) if self.shared_pos else None |
| 313 | for block in self.blocks: |
| 314 | x = block(x, mask, pos_bias=e) |
| 315 | x = self.norm(x) |
| 316 | x = self.dropout(x) |
| 317 | return x |
| 318 | |
| 319 | |
| 320 | class T5Decoder(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected