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

Method forward

ML/src/python/neuralforge/nn/convolution.py:16–32  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

14 self.downsample = downsample
15
16 def forward(self, x):
17 identity = x
18
19 out = self.conv1(x)
20 out = self.bn1(out)
21 out = self.relu(out)
22
23 out = self.conv2(out)
24 out = self.bn2(out)
25
26 if self.downsample is not None:
27 identity = self.downsample(x)
28
29 out += identity
30 out = self.relu(out)
31
32 return out
33
34class ResNet(nn.Module):
35 def __init__(self, block, layers, num_classes=1000, in_channels=3):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected