/Python/Def get_label(Dir): for nextdir in os.listdir(Dir): if not nextdir.startswith('.'): if nextdir in ['NORMAL']: label = 0 elif nextdir in ['PNEUMONIA']: label = 1 else: label = 2 return nextdir, label
Def get_label(Dir): for nextdir in os.listdir(Dir): if not nextdir.startswith('.'): if nextdir in ['NORMAL']: label = 0 elif nextdir in ['PNEUMONIA']: label = 1 else: label = 2 return nextdir, label
Def get_label(Dir): for nextdir in os.listdir(Dir): if not nextdir.startswith('.'): if nextdir in ['NORMAL']: label = 0 elif nextdir in ['PNEUMONIA']: label = 1 else: label = 2 return nextdir, label
0
- 2 votes104 views1 answer
- 0 vote88 views1 answer
- 1 vote139 views2 answers
- 0 vote107 views1 answer
- 0 vote98 views2 answers
- 71 votes54 views1 answer
- 1 vote107 views2 answers
- 9 votes92 views3 answers
- 62 votes153 views4 answers
- -1 vote102 views1 answer