parameters: (self, updates, inputs=None)
docstring: Add update op(s), potentially dependent on layer inputs.
  
      Weight updates (for instance, the updates of the moving mean and variance
      in a BatchNormalization layer) may be dependent on the inputs passed
      when calling a layer. Hence, when reusing a same layer on
      different inputs `a` and `b`, some entries in `layer.updates` may be
      dependent on `a` and some on `b`. This method automatically keeps track
      of dependencies.
  
      The `get_updates_for` method allows to retrieve the updates relevant to a
      specific set of inputs.
  
      Arguments:
        updates: Update op, or list/tuple of update ops.
        inputs: Optional input tensor(s) that the update(s) depend on. Must
          match the `inputs` argument passed to the `__call__` method at the time
          the updates are created. If `None` is passed, the updates are assumed
          to be unconditional, and will apply across all dataflows of the layer.
docstring_summary: Add update op(s), potentially dependent on layer inputs.
docstring_tokens: Add update op ( s ) potentially dependent on layer inputs .
function: def add_update(self, updates, inputs=None):
      """Add update op(s), potentially dependent on layer inputs.
  
      Weight updates (for instance, the updates of the moving mean and variance
      in a BatchNormalization layer) may be dependent on the inputs passed
      when calling a layer. Hence, when reusing a same layer on
      different inputs `a` and `b`, some entries in `layer.updates` may be
      dependent on `a` and some on `b`. This method automatically keeps track
      of dependencies.
  
      The `get_updates_for` method allows to retrieve the updates relevant to a
      specific set of inputs.
  
      Arguments:
        updates: Update op, or list/tuple of update ops.
        inputs: Optional input tensor(s) that the update(s) depend on. Must
          match the `inputs` argument passed to the `__call__` method at the time
          the updates are created. If `None` is passed, the updates are assumed
          to be unconditional, and will apply across all dataflows of the layer.
      """
      updates = _to_list(updates)
      if not updates:
        return
      self._updates += updates
      if inputs is not None:
        inputs = _to_list(inputs)
      if not inputs:
        inputs = None
      if inputs is not None:
        # We compute an ID that uniquely identifies the list of tensors.
        # This ID is order-sensitive.
        inputs_hash = _object_list_uid(inputs)
      else:
        inputs_hash = None
      if inputs_hash not in self._per_input_updates:
        self._per_input_updates[inputs_hash] = []
      self._per_input_updates[inputs_hash] += updates
function_tokens: def add_update ( self , updates , inputs = None ) : updates = _to_list ( updates ) if not updates : return self . _updates += updates if inputs is not None : inputs = _to_list ( inputs ) if not inputs : inputs = None if inputs is not None : # We compute an ID that uniquely identifies the list of tensors. # This ID is order-sensitive. inputs_hash = _object_list_uid ( inputs ) else : inputs_hash = None if inputs_hash not in self . _per_input_updates : self . _per_input_updates [ inputs_hash ] = [ ] self . _per_input_updates [ inputs_hash ] += updates