MCPcopy
hub / github.com/myshell-ai/OpenVoice / __init__

Method __init__

openvoice/modules.py:319–345  ·  view source on GitHub ↗
(self, channels, kernel_size=3, dilation=(1, 3))

Source from the content-addressed store, hash-verified

317
318class ResBlock2(torch.nn.Module):
319 def __init__(self, channels, kernel_size=3, dilation=(1, 3)):
320 super(ResBlock2, self).__init__()
321 self.convs = nn.ModuleList(
322 [
323 weight_norm(
324 Conv1d(
325 channels,
326 channels,
327 kernel_size,
328 1,
329 dilation=dilation[0],
330 padding=get_padding(kernel_size, dilation[0]),
331 )
332 ),
333 weight_norm(
334 Conv1d(
335 channels,
336 channels,
337 kernel_size,
338 1,
339 dilation=dilation[1],
340 padding=get_padding(kernel_size, dilation[1]),
341 )
342 ),
343 ]
344 )
345 self.convs.apply(init_weights)
346
347 def forward(self, x, x_mask=None):
348 for c in self.convs:

Callers

nothing calls this directly

Calls 2

get_paddingFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected