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

Method build

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

Source from the content-addressed store, hash-verified

473 return params_shape, axes
474
475 def build(self, inputs_shape):
476 params_shape, self.axes = self._get_param_shape(inputs_shape)
477
478 self.beta, self.gamma = None, None
479 if self.beta_init:
480 self.beta = self._get_weights("beta", shape=params_shape, init=self.beta_init)
481
482 if self.gamma_init:
483 self.gamma = self._get_weights("gamma", shape=params_shape, init=self.gamma_init)
484
485 def forward(self, inputs):
486 mean, var = tf.nn.moments(inputs, self.axes, keepdims=True)

Callers 1

__init__Method · 0.95

Calls 2

_get_param_shapeMethod · 0.95
_get_weightsMethod · 0.80

Tested by

no test coverage detected