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

Method __init__

beginner_source/nn_tutorial.py:701–705  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

699
700class Mnist_CNN(nn.Module):
701 def __init__(self):
702 super().__init__()
703 self.conv1 = nn.Conv2d(1, 16, kernel_size=3, stride=2, padding=1)
704 self.conv2 = nn.Conv2d(16, 16, kernel_size=3, stride=2, padding=1)
705 self.conv3 = nn.Conv2d(16, 10, kernel_size=3, stride=2, padding=1)
706
707 def forward(self, xb):
708 xb = xb.view(-1, 1, 28, 28)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected