MCPcopy Create free account
hub / github.com/Xiaobin-Rong/gtcrn / __init__

Method __init__

stream/modules/convolution.py:17–38  ·  view source on GitHub ↗
(self,
                in_channels: int,
                out_channels: int,
                kernel_size: int,
                stride: int=1,
                padding: int=0,
                dilation: int=1,
                groups: int=1,
                bias: bool=True,
                *args, **kargs)

Source from the content-addressed store, hash-verified

15
16class StreamConv1d(nn.Module):
17 def __init__(self,
18 in_channels: int,
19 out_channels: int,
20 kernel_size: int,
21 stride: int=1,
22 padding: int=0,
23 dilation: int=1,
24 groups: int=1,
25 bias: bool=True,
26 *args, **kargs):
27 super(StreamConv1d, self).__init__(*args, *kargs)
28
29 assert padding == 0, "To meet the demands of causal streaming requirements"
30
31 self.Conv1d = nn.Conv1d(in_channels = in_channels,
32 out_channels = out_channels,
33 kernel_size = kernel_size,
34 stride = stride,
35 padding = padding,
36 dilation = dilation,
37 groups = groups,
38 bias = bias)
39
40 def forward(self, x, cache):
41 """

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected