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

Function convnormrelu

examples/ImageNetModels/vgg16.py:48–56  ·  view source on GitHub ↗
(x, name, chan)

Source from the content-addressed store, hash-verified

46
47
48def convnormrelu(x, name, chan):
49 x = Conv2D(name, x, chan, 3)
50 if args.norm == 'bn':
51 x = BatchNorm(name + '_bn', x)
52 elif args.norm == 'gn':
53 with tf.variable_scope(name + '_gn'):
54 x = GroupNorm(x, 32)
55 x = tf.nn.relu(x, name=name + '_relu')
56 return x
57
58
59class Model(ImageNetModel):

Callers

nothing calls this directly

Calls 3

Conv2DFunction · 0.85
GroupNormFunction · 0.70
BatchNormFunction · 0.50

Tested by

no test coverage detected