MCPcopy
hub / github.com/FACEGOOD/FACEGOOD-Audio2Face / __init__

Method __init__

code/train/model_paper.py:41–56  ·  view source on GitHub ↗
(self, kernels_size=None, outputs=None)

Source from the content-addressed store, hash-verified

39 outputs: list, the output channels of each conv2d layer
40 """
41 def __init__(self, kernels_size=None, outputs=None):
42 super(FormantLayer, self).__init__()
43
44 if kernels_size is None:
45 kernels_size = [[3, 1], [3, 1], [3, 1], [3, 1], [2, 1]]
46 if outputs is None:
47 outputs = [72, 108, 162, 243, 256]
48
49 self.kernels_size = kernels_size
50 self.outputs = outputs
51
52 self.formant_layers = models.Sequential()
53 for i in range(len(self.kernels_size)):
54 self.formant_layers.add(conv2d_layer(filters=self.outputs[i],
55 kernel_size=self.kernels_size[i],
56 strides=[2, 1]))
57
58 def call(self, x):
59 x = self.formant_layers(x)

Callers

nothing calls this directly

Calls 2

conv2d_layerFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected