MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/nn/convolution.py:7–14  ·  view source on GitHub ↗
(self, in_channels, out_channels, stride=1, downsample=None)

Source from the content-addressed store, hash-verified

5
6class ResNetBlock(nn.Module):
7 def __init__(self, in_channels, out_channels, stride=1, downsample=None):
8 super().__init__()
9 self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=stride, padding=1, bias=False)
10 self.bn1 = nn.BatchNorm2d(out_channels)
11 self.relu = nn.ReLU(inplace=True)
12 self.conv2 = nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=False)
13 self.bn2 = nn.BatchNorm2d(out_channels)
14 self.downsample = downsample
15
16 def forward(self, x):
17 identity = x

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected