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

Function preact_bottleneck

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

Source from the content-addressed store, hash-verified

44
45
46def preact_bottleneck(l, ch_out, stride, preact):
47 # stride is applied on the second conv, following fb.resnet.torch
48 l, shortcut = apply_preactivation(l, preact)
49 l = Conv2D('conv1', l, ch_out, 1, activation=BNReLU)
50 l = Conv2D('conv2', l, ch_out, 3, strides=stride, activation=BNReLU)
51 l = Conv2D('conv3', l, ch_out * 4, 1)
52 return l + resnet_shortcut(shortcut, ch_out * 4, stride)
53
54
55def preact_group(name, l, block_func, features, count, stride):

Callers

nothing calls this directly

Calls 3

Conv2DFunction · 0.90
apply_preactivationFunction · 0.70
resnet_shortcutFunction · 0.70

Tested by

no test coverage detected