“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” Code Answer


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
python by Nervous Narwhal on Jun 08 2020 Donate
0


Python queries related to “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”



Learn how Grepper helps you improve as a Developer!




INSTALL GREPPER FOR CHROME



All Python Answers

X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.