MCPcopy Create free account
hub / github.com/649453932/Chinese-Text-Classification-Pytorch / forward

Method forward

models/TextCNN.py:60–66  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

58 return x
59
60 def forward(self, x):
61 out = self.embedding(x[0])
62 out = out.unsqueeze(1)
63 out = torch.cat([self.conv_and_pool(out, conv) for conv in self.convs], 1)
64 out = self.dropout(out)
65 out = self.fc(out)
66 return out

Callers

nothing calls this directly

Calls 1

conv_and_poolMethod · 0.95

Tested by

no test coverage detected