(self, x)
| 55 | self.fc2 = nn.Linear(config.hidden_size, config.num_classes) |
| 56 | |
| 57 | def forward(self, x): |
| 58 | |
| 59 | out_word = self.embedding(x[0]) |
| 60 | out_bigram = self.embedding_ngram2(x[2]) |
| 61 | out_trigram = self.embedding_ngram3(x[3]) |
| 62 | out = torch.cat((out_word, out_bigram, out_trigram), -1) |
| 63 | |
| 64 | out = out.mean(dim=1) |
| 65 | out = self.dropout(out) |
| 66 | out = self.fc1(out) |
| 67 | out = F.relu(out) |
| 68 | out = self.fc2(out) |
| 69 | return out |
nothing calls this directly
no outgoing calls
no test coverage detected