MCPcopy Create free account
hub / github.com/ICTMCG/FakeSV / forward

Method forward

code/models/Baselines.py:124–134  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

122 self.classifier = nn.Linear(self.fea_dim,2)
123
124 def forward(self, **kwargs):
125 title_w2v = kwargs['title_w2v']
126 text = title_w2v.unsqueeze(1)
127 text = [F.relu(conv(text)).squeeze(3) for conv in self.textcnn]
128 text = [F.max_pool1d(i.squeeze(2), i.shape[-1]).squeeze(2) for i in text]
129 fea_text = torch.cat(text, 1)
130 fea_text = self.linear(fea_text)
131
132 output = self.classifier(fea_text)
133
134 return output
135
136class bComments(torch.nn.Module):
137 def __init__(self,bert_model,fea_dim):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected