Search code examples
tensorflowimportreduction

How to import ReductionV2 in tensorflow?


I want to import the method ReductionV2 in tensorflow but I cannot find the source. I'm looking for this method:

losses_utils.ReductionV2.AUTO

But when I try to import it I get:

ModuleNotFoundError: No module named 'tensorflow.keras.utils.losses_utils'


Solution

  • Use tf.keras.losses.Reduction, default value will be AUTO