(self, inputs_shape)
| 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): |