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

Method __init__

code/utils/vggish_modified.py:55–68  ·  view source on GitHub ↗

Constructs a postprocessor.

(self)

Source from the content-addressed store, hash-verified

53 """
54
55 def __init__(self):
56 """Constructs a postprocessor."""
57 super(Postprocessor, self).__init__()
58 # Create empty matrix, for user's state_dict to load
59 self.pca_eigen_vectors = torch.empty(
60 (vggish_params.EMBEDDING_SIZE, vggish_params.EMBEDDING_SIZE,),
61 dtype=torch.float,
62 )
63 self.pca_means = torch.empty(
64 (vggish_params.EMBEDDING_SIZE, 1), dtype=torch.float
65 )
66
67 self.pca_eigen_vectors = nn.Parameter(self.pca_eigen_vectors, requires_grad=False)
68 self.pca_means = nn.Parameter(self.pca_means, requires_grad=False)
69
70 def postprocess(self, embeddings_batch):
71 """Applies tensor postprocessing to a batch of embeddings.

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected