parameters: (self, getter, *args, **kwargs)
return_statement: return variable
docstring: Custom getter for layer variables.
docstring_summary: Custom getter for layer variables.
docstring_tokens: Custom getter for layer variables .
function: def _update_trainable_weights(self, getter, *args, **kwargs):
      """Custom getter for layer variables."""
      # Add variables to layer's `(non_)trainable_weights` list(s).
      variable = getter(*args, **kwargs)
      trainable = kwargs.get("trainable", True)
      if trainable and variable not in self._trainable_weights:
        self._trainable_weights.append(variable)
      elif not trainable and variable not in self._non_trainable_weights:
        self._non_trainable_weights.append(variable)
      return variable
function_tokens: def _update_trainable_weights ( self , getter , * args , * * kwargs ) : # Add variables to layer's `(non_)trainable_weights` list(s). variable = getter ( * args , * * kwargs ) trainable = kwargs . get ( "trainable" , True ) if trainable and variable not in self . _trainable_weights : self . _trainable_weights . append ( variable ) elif not trainable and variable not in self . _non_trainable_weights : self . _non_trainable_weights . append ( variable ) return variable