Tag Archives: AI/ML/DL

WARNING:tensorflow:`add_update` `inputs` kwarg has been deprecated.

    Use the layer defined by tensorflow 1x in TF2 warning:

WARNING:tensorflow:`add_ update` `inputs` kwarg has been deprecated.

    Check is to use self. Add in the custom BN layer_ Update ([…], inputs), while using autograph in the tf2x version, the inputs parameter has been eliminated. Of course, if it is written, it will be compatible, but it will be warned. Modify to: self.add_ Update ([…]) can avoid the harassment of warning.

https://github.com/tensorflow/tensorflow/blob/r2.1/tensorflow/python/keras/engine/base_ layer.py

  @deprecation.deprecated_args(None, '`inputs` is now automatically inferred',
                               'inputs')
  @doc_controls.for_subclass_implementers
  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 the 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.
    This call is ignored when eager execution is enabled (in that case, variable
    updates are run on the fly and thus do not need to be tracked for later
    execution).
    Arguments:
      updates: Update op, or list/tuple of update ops, or zero-arg callable
        that returns an update op. A zero-arg callable should be passed in
        order to disable running the updates by setting `trainable=False`
        on this Layer, when executing in Eager mode.
      inputs: Deprecated, will be automatically inferred.
    """