Get trainable variables.
(self, var_name, shape, init=tl.initializers.random_normal(), trainable=True)
| 297 | self._nodes_fixed = True |
| 298 | |
| 299 | def _get_weights(self, var_name, shape, init=tl.initializers.random_normal(), trainable=True): |
| 300 | """ Get trainable variables. """ |
| 301 | weight = get_variable_with_initializer(scope_name=self.name, var_name=var_name, shape=shape, init=init) |
| 302 | if trainable is True: |
| 303 | if self._trainable_weights is None: |
| 304 | self._trainable_weights = list() |
| 305 | self._trainable_weights.append(weight) |
| 306 | else: |
| 307 | if self._nontrainable_weights is None: |
| 308 | self._nontrainable_weights = list() |
| 309 | self._nontrainable_weights.append(weight) |
| 310 | return weight |
| 311 | |
| 312 | @abstractmethod |
| 313 | def build(self, inputs_shape): |