'Add updates to the layer.
The updates may potentially be conditional on some inputs tensors,
for instance batch norm updates are conditional on the layer\'s inputs.
# Arguments
updates: update op or list of update ops
to add to the layer.
inputs: input tensor or list of inputs tensors to mark
the updates as conditional on these inputs.
If None is passed, the updates are assumed unconditional.'

def add_update(self, updates, inputs=None):

    if ((updates is None) or (updates == [])):
        return
    updates = _to_list(updates)
    if hasattr(self, '_updates'):
        self._updates += updates
    if (isinstance(inputs, list) and (inputs == [])):
        inputs = None
    if (inputs is not None):
        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
