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

Method __init__

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

Source from the content-addressed store, hash-verified

73
74class Conv2dModule(torch.nn.Module):
75 def __init__(
76 self,
77 bias: bool = True,
78 dilation: Union[int, tuple[int, int]] = 1,
79 in_channels: int = 4,
80 kernel_size: Union[int, tuple[int, int]] = 3,
81 out_channels: int = 8,
82 padding: Union[str, int, Collection[int]] = 0,
83 stride: Union[int, tuple[int, int]] = 2,
84 group: int = 1,
85 ):
86 super().__init__()
87
88 self.conv = torch.nn.Conv2d(
89 in_channels=in_channels,
90 out_channels=out_channels,
91 kernel_size=kernel_size,
92 stride=stride,
93 padding=padding,
94 dilation=dilation,
95 bias=bias,
96 groups=group,
97 )
98
99 def forward(self, x):
100 return self.conv(x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected