tf.compat.v1.assign_sub

View source on GitHub

Update ref by subtracting value from it.

tf.compat.v1.assign_sub(
    ref, value, use_locking=None, name=None
)

This operation outputs ref after the update is done. This makes it easier to chain operations that need to use the reset value. Unlike tf.math.subtract, this op does not broadcast. ref and value must have the same shape.

Args:

Returns:

Same as "ref". Returned as a convenience for operations that want to use the new value after the variable has been updated.