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

Method build

tensorlayer/layers/activation.py:86–92  ·  view source on GitHub ↗
(self, inputs_shape)

Source from the content-addressed store, hash-verified

84 return s.format(classname=self.__class__.__name__, **self.__dict__)
85
86 def build(self, inputs_shape):
87 if self.channel_shared:
88 w_shape = (1, )
89 else:
90 w_shape = (inputs_shape[-1], )
91 self.alpha_var = self._get_weights("alpha", shape=w_shape, init=self.a_init)
92 self.alpha_var_constrained = tf.nn.sigmoid(self.alpha_var, name="constraining_alpha_var_in_0_1")
93
94 # @tf.function
95 def forward(self, inputs):

Callers 1

__init__Method · 0.95

Calls 1

_get_weightsMethod · 0.80

Tested by

no test coverage detected