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

Class VGG

code/utils/vggish_modified.py:16–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16class VGG(nn.Module):
17 def __init__(self, features):
18 super(VGG, self).__init__()
19 self.features = features
20 self.embeddings = nn.Sequential(
21 nn.Linear(512 * 4 * 6, 4096),
22 nn.ReLU(True),
23 nn.Linear(4096, 4096),
24 nn.ReLU(True),
25 nn.Linear(4096, 128),
26 nn.ReLU(True))
27
28 def forward(self, x):
29 x = self.features(x)
30
31 # Transpose the output from features to
32 # remain compatible with vggish embeddings
33 x = torch.transpose(x, 1, 3)
34 x = torch.transpose(x, 1, 2)
35 x = x.contiguous()
36 x = x.view(x.size(0), -1)
37
38 return x
39 # return self.embeddings(x)
40
41
42class Postprocessor(nn.Module):

Callers 1

_vggFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected