I am trying to use a custom loss in keras:
from tensorflow.keras import backend as K def IoULoss(targets, inputs, smooth=1e-6): #flatten label and predic