-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
I am using you discriminative loss function for another use. And I discovered that if instance_num==1, the l_dist term will become nan because mu_norm=[]. So I suggest to add a sentence like l_dist = tf.cond(num_instances<=1, lambda:tf.zeros(1, dtype=tf.float32), lambda:tf.reduce_mean(mu_norm)) after the calculation of l_dist term.
Do you think it's necessary? If so, may I add a pull request to your repo?
Metadata
Metadata
Assignees
Labels
No labels