(zero_init=False)
| 110 | |
| 111 | |
| 112 | def 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 | |
| 124 | def resnet_shortcut(l, n_out, stride, activation=tf.identity): |
no outgoing calls
no test coverage detected
searching dependent graphs…