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

Class SimpleConv

docs/source/tutorials_source/export-to-executorch-tutorial.py:55–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55class SimpleConv(torch.nn.Module):
56 def __init__(self) -> None:
57 super().__init__()
58 self.conv = torch.nn.Conv2d(
59 in_channels=3, out_channels=16, kernel_size=3, padding=1
60 )
61 self.relu = torch.nn.ReLU()
62
63 def forward(self, x: torch.Tensor) -> torch.Tensor:
64 a = self.conv(x)
65 return self.relu(a)
66
67
68example_args: tuple[torch.Tensor] = (torch.randn(1, 3, 256, 256),)

Calls

no outgoing calls

Tested by

no test coverage detected