diff --git a/bob/learn/pytorch/datasets/utils.py b/bob/learn/pytorch/datasets/utils.py index df1079e8f5fbe9f516863b78863ac8b32eb187df..ffc9e86b8bb59401d2ef18b8a7ee9bee66396960 100644 --- a/bob/learn/pytorch/datasets/utils.py +++ b/bob/learn/pytorch/datasets/utils.py @@ -90,18 +90,8 @@ def map_labels(raw_labels, start_index=0): for i in range(len(possible_labels)): l = possible_labels[i] - #labels[numpy.where(labels==l)[0][0]] = i + start_index labels[numpy.where(labels==l)[0]] = i + start_index - # ----- - # map back to native int, resolve the problem with dataset concatenation - # it does: line 78 is now ok - # for some reason, it was not working when the type of id labels were numpy.int64 ... - #labels_int = [] - #for i in range(len(labels)): - # labels_int.append(labels[i].item()) - - #return labels_int return labels from torch.utils.data import Dataset