MCPcopy Create free account
hub / github.com/pytorch/executorch / __init__

Method __init__

backends/nxp/tests/models.py:15–37  ·  view source on GitHub ↗
(
        self,
        in_channels: int = 4,
        out_channels: int = 8,
        kernel_size: Union[int, tuple[int]] = 3,
        stride: Union[int, tuple[int]] = 2,
        padding: Union[str, int, tuple[int]] = 0,
        dilation: Union[int, tuple[int]] = 1,
        groups: int = 1,
        bias: bool = True,
    )

Source from the content-addressed store, hash-verified

13
14class Conv1dModule(torch.nn.Module):
15 def __init__(
16 self,
17 in_channels: int = 4,
18 out_channels: int = 8,
19 kernel_size: Union[int, tuple[int]] = 3,
20 stride: Union[int, tuple[int]] = 2,
21 padding: Union[str, int, tuple[int]] = 0,
22 dilation: Union[int, tuple[int]] = 1,
23 groups: int = 1,
24 bias: bool = True,
25 ):
26 super().__init__()
27
28 self.conv = torch.nn.Conv1d(
29 in_channels=in_channels,
30 out_channels=out_channels,
31 kernel_size=kernel_size,
32 stride=stride,
33 padding=padding,
34 dilation=dilation,
35 bias=bias,
36 groups=groups,
37 )
38
39 def forward(self, x):
40 return self.conv(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected