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

Function preact_group

examples/ResNet/resnet_model.py:55–65  ·  view source on GitHub ↗
(name, l, block_func, features, count, stride)

Source from the content-addressed store, hash-verified

53
54
55def preact_group(name, l, block_func, features, count, stride):
56 with tf.variable_scope(name):
57 for i in range(0, count):
58 with tf.variable_scope('block{}'.format(i)):
59 # first block doesn't need activation
60 l = block_func(l, features,
61 stride if i == 0 else 1,
62 'no_preact' if i == 0 else 'bnrelu')
63 # end of each group need an extra activation
64 l = BNReLU('bnlast', l)
65 return l
66# ----------------- pre-activation resnet ----------------------
67
68

Callers

nothing calls this directly

Calls 2

BNReLUFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected