MCPcopy Create free account
hub / github.com/apache/singa / __init__

Method __init__

examples/cnn_ms/model/resnet.py:42–52  ·  view source on GitHub ↗
(self, inplanes, planes, stride=1, downsample=None)

Source from the content-addressed store, hash-verified

40 expansion = 1
41
42 def __init__(self, inplanes, planes, stride=1, downsample=None):
43 super(BasicBlock, self).__init__()
44 self.conv1 = conv3x3(inplanes, planes, stride)
45 self.bn1 = layer.BatchNorm2d(planes)
46 self.conv2 = conv3x3(planes, planes)
47 self.bn2 = layer.BatchNorm2d(planes)
48 self.relu1 = layer.ReLU()
49 self.add = layer.Add()
50 self.relu2 = layer.ReLU()
51 self.downsample = downsample
52 self.stride = stride
53
54 def forward(self, x):
55 residual = x

Callers

nothing calls this directly

Calls 3

AddMethod · 0.80
conv3x3Function · 0.70
__init__Method · 0.45

Tested by

no test coverage detected