MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / resnet_basicblock

Function resnet_basicblock

examples/ResNet/resnet_model.py:69–74  ·  view source on GitHub ↗
(l, ch_out, stride)

Source from the content-addressed store, hash-verified

67
68
69def resnet_basicblock(l, ch_out, stride):
70 shortcut = l
71 l = Conv2D('conv1', l, ch_out, 3, strides=stride, activation=BNReLU)
72 l = Conv2D('conv2', l, ch_out, 3, activation=get_bn(zero_init=True))
73 out = l + resnet_shortcut(shortcut, ch_out, stride, activation=get_bn(zero_init=False))
74 return tf.nn.relu(out)
75
76
77def resnet_bottleneck(l, ch_out, stride, stride_first=False):

Callers

nothing calls this directly

Calls 3

Conv2DFunction · 0.90
get_bnFunction · 0.70
resnet_shortcutFunction · 0.70

Tested by

no test coverage detected