(self, inputs)
| 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( |
nothing calls this directly
no test coverage detected