سلا من وقتی کد زیر رو اجرا میکنم
# Data loading and preprocessing
from PIL import Image
def read_all_images(in_dir):
X=[]
for item in os.listdir(in_dir):
if os.path.isfile(os.path.join(in_dir,item)):
im = Image.open(os.path.join(in_dir,item))
X.append(im)
return X
f = open("labelsv.csv",mode='r')
Y=[]
for line in f.readlines():
k=[0 for i in range(103)]
k[int(line)]=1.0
Y.append(k)
X=read_all_images('jpg224_1')
با خطای زیر مواجه میشم
Traceback (most recent call last):
File "vgg.py", line 23, in <module>
File "vgg.py", line 10, in read_all_images
File "C:\Users\Master\Anaconda3\envs\anaconda35\lib\site-packages\PIL\Image.py", line 2282, in open
OSError: [Errno 24] Too many open files: 'resized224\\image_08189jpg'