I am tryin the code below using IMBD dataset. This is the code published in the book (deep-learning-with-python) and for some reason it keeps giving me the error "no such file or directory"
I don't know what i am doing wrong
enter code here
imdb_dir = 'C:/Users/st/Downloads/aclImdb'
train_dir = os.path.join(imdb_dir,'train')
labels = []
texts = []
for label_type in ['neg', 'pos']:
dir_name = os.path.join(train_dir, label_type)
for fname in os.listdir(dir_name):
if fname[-4:] == '.txt':
f = open(os.path.join(dir_name, fname))
texts.append(f.read())
f.close()
if label_type == 'neg':
labels.append(0)
else:
labels.append(1)