I am training a face recognition network with 3000 identities dataset, so the real label's id are in 0 ~ 2,999. Then I found that the triplet loss would get Nan value when the real label's id is greater than 159. So I re-arrange the real label to 0 ~ (num_classes_per_batch - 1), but it still don't work when the num_classes_per_batch > 160.
Before labels re-arrangement:
After labels re-arrangement:
In this case, I would like to increase the num_classes_per_batch, but it would get nan value when the num_classes_per_batch > 160.
I am training a face recognition network with 3000 identities dataset, so the real label's id are in 0 ~ 2,999. Then I found that the triplet loss would get Nan value when the real label's id is greater than 159. So I re-arrange the real label to 0 ~ (
num_classes_per_batch - 1
), but it still don't work when thenum_classes_per_batch > 160
.Before labels re-arrangement:
After labels re-arrangement:
In this case, I would like to increase the
num_classes_per_batch
, but it would get nan value when thenum_classes_per_batch > 160
.