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

Function apply_preactivation

examples/Saliency/resnet_model.py:30–36  ·  view source on GitHub ↗
(l, preact)

Source from the content-addressed store, hash-verified

28
29# ----------------- pre-activation resnet ----------------------
30def apply_preactivation(l, preact):
31 if preact == 'bnrelu':
32 shortcut = l # preserve identity mapping
33 l = BNReLU('preact', l)
34 else:
35 shortcut = l
36 return l, shortcut
37
38
39def preact_basicblock(l, ch_out, stride, preact):

Callers 2

preact_basicblockFunction · 0.70
preact_bottleneckFunction · 0.70

Calls 1

BNReLUFunction · 0.90

Tested by

no test coverage detected