MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / forward

Method forward

tensorlayer/layers/normalization.py:663–671  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

661 self.norm_axes = range(self.begin_norm_axis, len(inputs_shape))
662
663 def forward(self, inputs):
664 mean, var = tf.nn.moments(inputs, self.norm_axes, keepdims=True)
665 # compute layer normalization using batch_normalization function
666 outputs = batch_normalization(
667 inputs, mean, var, self.beta, self.gamma, self.epsilon, data_format=self.data_format
668 )
669 if self.act:
670 outputs = self.act(outputs)
671 return outputs
672
673 # with tf.compat.v1.variable_scope(name) as vs:
674 # self.outputs = tf.contrib.layers.layer_norm(

Callers

nothing calls this directly

Calls 1

batch_normalizationFunction · 0.85

Tested by

no test coverage detected