(self, inputs)
| 28 | self.linear = nn.Sequential(torch.nn.Linear(len(self.window_size) * self.filter_num, self.fea_dim),torch.nn.ReLU()) |
| 29 | |
| 30 | def forward(self, inputs): |
| 31 | text = inputs.unsqueeze(1) |
| 32 | text = [F.relu(conv(text)).squeeze(3) for conv in self.textcnn] |
| 33 | text = [F.max_pool1d(i.squeeze(2), i.shape[-1]).squeeze(2) for i in text] |
| 34 | fea_text = torch.cat(text, 1) |
| 35 | fea_text = self.linear(fea_text) |
| 36 | |
| 37 | return fea_text |
| 38 | |
| 39 | |
| 40 | class VideoEncoder(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected