3 from __future__
import absolute_import, division, print_function, unicode_literals
10 Adds normalization to train_net for given parameter. Its factor ahead of 11 regularization is given when initialization. 12 The param should be a BlobReference. 15 def __call__(self, net, param):
16 return self.
_run(net, param)
18 def _run(self, net, param):
19 raise Exception(
"Not Impelemented")
23 def __init__(self, momentum):
24 super(BatchNormalizer, self).__init__()
27 def _run(self, layer_model, param):
28 return layer_model.BatchNormalization(
34 def __init__(self, epsilon, use_layer_norm_op=True):
35 super(LayerNormalizer, self).__init__()
39 def _run(self, layer_model, param):
40 return layer_model.LayerNormalization(
def _run(self, net, param)