(self, x, emb, **kwargs)
| 195 | dropout) |
| 196 | |
| 197 | def forward(self, x, emb, **kwargs): |
| 198 | B, T, D = x.shape |
| 199 | x = x.reshape(B, T, 8, -1) |
| 200 | output = [] |
| 201 | for i in range(8): |
| 202 | feat = x[:, :, i].contiguous() |
| 203 | feat = self.dropout(self.activation(self.linear1_list[i](feat))) |
| 204 | feat = self.linear2_list[i](feat) |
| 205 | output.append(feat) |
| 206 | y = torch.cat(output, dim=-1) |
| 207 | y = x.reshape(B, T, D) + self.proj_out(y, emb) |
| 208 | return y |
| 209 | |
| 210 | |
| 211 | class DecoderLayer(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected