MCPcopy Create free account
hub / github.com/Standard-Intelligence/hertz-dev / __init__

Method __init__

tokenizer.py:66–91  ·  view source on GitHub ↗
(
        self,
        in_channels,
        out_channels,
        kernel_size,
        stride,
        padding=-1,
        output_padding=-1,
        groups=1,
        bias=True,
    )

Source from the content-addressed store, hash-verified

64 """1D noncausal transpose convolution."""
65
66 def __init__(
67 self,
68 in_channels,
69 out_channels,
70 kernel_size,
71 stride,
72 padding=-1,
73 output_padding=-1,
74 groups=1,
75 bias=True,
76 ):
77 super().__init__()
78 if padding < 0:
79 padding = (stride+1) // 2
80 if output_padding < 0:
81 output_padding = 1 if stride % 2 else 0
82 self.deconv = nn.ConvTranspose1d(
83 in_channels=in_channels,
84 out_channels=out_channels,
85 kernel_size=kernel_size,
86 stride=stride,
87 padding=padding,
88 output_padding=output_padding,
89 groups=groups,
90 bias=bias,
91 )
92
93 def forward(self, x):
94 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected