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

Class Conv2dModule

backends/nxp/tests/models.py:74–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
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)
101
102
103class Conv3dModule(torch.nn.Module):

Calls

no outgoing calls