Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Instead of labels, file names were used for making label-to-class map.
  • Loading branch information
ibraheemmmoosa authored Feb 9, 2021
1 parent 253063d commit eade7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flash/vision/classification/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
self.transform = transform
self.loader = loader
if self.has_labels:
self.label_to_class_mapping = {v: k for k, v in enumerate(list(sorted(list(set(self.fnames)))))}
self.label_to_class_mapping = {v: k for k, v in enumerate(list(sorted(list(set(self.labels)))))}

@property
def has_labels(self) -> bool:
Expand Down

0 comments on commit eade7cd

Please sign in to comment.