Commit 79cecbd2 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[utils] remove comments in the map_label function

parent 46fc1f92
...@@ -90,18 +90,8 @@ def map_labels(raw_labels, start_index=0): ...@@ -90,18 +90,8 @@ def map_labels(raw_labels, start_index=0):
for i in range(len(possible_labels)): for i in range(len(possible_labels)):
l = possible_labels[i] l = possible_labels[i]
#labels[numpy.where(labels==l)[0][0]] = i + start_index
labels[numpy.where(labels==l)[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 return labels
from torch.utils.data import Dataset from torch.utils.data import Dataset
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment