MCPcopy
hub / github.com/tensorlayer/TensorLayer / build

Method build

tensorlayer/layers/normalization.py:653–661  ·  view source on GitHub ↗
(self, inputs_shape)

Source from the content-addressed store, hash-verified

651 )
652
653 def build(self, inputs_shape):
654 params_shape = inputs_shape[self.begin_params_axis:]
655 self.beta, self.gamma = None, None
656 if self.center:
657 self.beta = self._get_weights("beta", shape=params_shape, init=self.beta_init)
658 if self.scale:
659 self.gamma = self._get_weights("gamma", shape=params_shape, init=self.gamma_init)
660
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)

Callers

nothing calls this directly

Calls 1

_get_weightsMethod · 0.80

Tested by

no test coverage detected