MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / get_norm

Function get_norm

examples/FasterRCNN/modeling/backbone.py:112–121  ·  view source on GitHub ↗
(zero_init=False)

Source from the content-addressed store, hash-verified

110
111
112def get_norm(zero_init=False):
113 if cfg.BACKBONE.NORM == 'None':
114 return lambda x: x
115 if cfg.BACKBONE.NORM == 'GN':
116 Norm = GroupNorm
117 layer_name = 'gn'
118 else:
119 Norm = BatchNorm
120 layer_name = 'bn'
121 return lambda x: Norm(layer_name, x, gamma_initializer=tf.zeros_initializer() if zero_init else None)
122
123
124def resnet_shortcut(l, n_out, stride, activation=tf.identity):

Callers 2

nonlinFunction · 0.85
resnet_bottleneckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…